]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add some info to the failure messages
authorNeal Norwitz <nnorwitz@gmail.com>
Tue, 18 Mar 2008 06:03:46 +0000 (06:03 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Tue, 18 Mar 2008 06:03:46 +0000 (06:03 +0000)
Lib/test/test_errno.py

index e42c86d59b6940a0db1f8171c1cb4dcc451ea4ec..cab5f3357f302ade374159dc97513bb415a8ef59 100755 (executable)
@@ -48,7 +48,7 @@ class ErrnoAttributeTests(unittest.TestCase):
     def test_using_errorcode(self):
         # Every key value in errno.errorcode should be on the module.
         for value in errno.errorcode.itervalues():
-            self.assert_(hasattr(errno, value))
+            self.assert_(hasattr(errno, value), 'no %s attr in errno' % value)
 
 
 class ErrorcodeTests(unittest.TestCase):
@@ -56,7 +56,8 @@ class ErrorcodeTests(unittest.TestCase):
     def test_attributes_in_errorcode(self):
         for attribute in errno.__dict__.iterkeys():
             if attribute.isupper():
-                self.assert_(getattr(errno, attribute) in errno.errorcode)
+                self.assert_(getattr(errno, attribute) in errno.errorcode,
+                             'no %s attr in errno.errorcode' % attribute)
 
 
 def test_main():