[Python-checkins] r50895 - python/trunk/Lib/test/test_inspect.py

neal.norwitz python-checkins at python.org
Fri Jul 28 06:22:36 CEST 2006


Author: neal.norwitz
Date: Fri Jul 28 06:22:34 2006
New Revision: 50895

Modified:
   python/trunk/Lib/test/test_inspect.py
Log:
Ensure the actual number matches the expected count

Modified: python/trunk/Lib/test/test_inspect.py
==============================================================================
--- python/trunk/Lib/test/test_inspect.py	(original)
+++ python/trunk/Lib/test/test_inspect.py	Fri Jul 28 06:22:34 2006
@@ -43,10 +43,11 @@
 
 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')


More information about the Python-checkins mailing list