summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-07-28 04:22:34 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-07-28 04:22:34 (GMT)
commitdf80af7659c05e45bb3500ce4cecca1f3f426280 (patch)
tree665731727dcfe13a871f9d48c97471c87716709e /Lib
parent641cddf0faa2aa50935e8f963094d9a0d7857adb (diff)
downloadcpython-df80af7659c05e45bb3500ce4cecca1f3f426280.zip
cpython-df80af7659c05e45bb3500ce4cecca1f3f426280.tar.gz
cpython-df80af7659c05e45bb3500ce4cecca1f3f426280.tar.bz2
Ensure the actual number matches the expected count
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_inspect.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py
index 928af07..300de14 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')