From: Neal Norwitz Date: Fri, 28 Jul 2006 04:22:34 +0000 (+0000) Subject: Ensure the actual number matches the expected count X-Git-Tag: v2.5b3~113 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=df80af7659c05e45bb3500ce4cecca1f3f426280;p=thirdparty%2FPython%2Fcpython.git Ensure the actual number matches the expected count --- diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py index 928af07c41d6..300de1416b9d 100644 --- a/Lib/test/test_inspect.py +++ b/Lib/test/test_inspect.py @@ -43,10 +43,11 @@ class IsTestBase(unittest.TestCase): class TestPredicates(IsTestBase): def test_thirteen(self): - # Doc/lib/libinspect.tex claims there are 13 such functions count = len(filter(lambda x:x.startswith('is'), dir(inspect))) - self.assertEqual(count, 13, - "There are %d (not 12) is* functions" % count) + # Doc/lib/libinspect.tex claims there are 13 such functions + expected = 13 + err_msg = "There are %d (not %d) is* functions" % (count, expected) + self.assertEqual(count, expected, err_msg) def test_excluding_predicates(self): self.istest(inspect.isbuiltin, 'sys.exit')