From: Ben Waugh Date: Fri, 12 Apr 2013 09:58:20 +0000 (+0100) Subject: Replace partial list of Nose assertions with instructions for listing them in Python. X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=1049c1b69463f1acebc5b73fbdaf1a57bba3dc49;p=swc-testing-nose.git Replace partial list of Nose assertions with instructions for listing them in Python. --- diff --git a/python/testing/cheat-sheet.md b/python/testing/cheat-sheet.md index 65c521b..36f3557 100644 --- a/python/testing/cheat-sheet.md +++ b/python/testing/cheat-sheet.md @@ -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