Replace partial list of Nose assertions with instructions for listing them in Python. test-waugh
authorBen Waugh <b.waugh@ucl.ac.uk>
Fri, 12 Apr 2013 09:58:20 +0000 (10:58 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 1 Nov 2013 20:49:46 +0000 (13:49 -0700)
python/testing/cheat-sheet.md

index 65c521b4c6982230760363b801052f210003ddcd..36f355709f614c5db67e2a5e841f0d718e8470e8 100644 (file)
@@ -70,11 +70,11 @@ Nose provides a range of assertions that can be used when a test is not just che
         expected = [2, 3]
         assert_items_equal(observed, expected) # order of factors is not guaranteed
 
-* assertTrue, assertFalse
-* assertIn, assertNotIn
-* assertIs, assertIsNot
-* assertRaises
-* (what else?)
+To see the available assertions, and get help with them:
+
+    import nose.tools
+    dir(nose.tools)                   # list assertions and other classes/functions
+    help(nose.tools.assert_set_equal) # get information about one of them
 
 ### Floating point tests