[Python-checkins] r61507 - python/trunk/Lib/test/test_errno.py

neal.norwitz python-checkins at python.org
Tue Mar 18 07:03:46 CET 2008


Author: neal.norwitz
Date: Tue Mar 18 07:03:46 2008
New Revision: 61507

Modified:
   python/trunk/Lib/test/test_errno.py
Log:
Add some info to the failure messages

Modified: python/trunk/Lib/test/test_errno.py
==============================================================================
--- python/trunk/Lib/test/test_errno.py	(original)
+++ python/trunk/Lib/test/test_errno.py	Tue Mar 18 07:03:46 2008
@@ -48,7 +48,7 @@
     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 @@
     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():


More information about the Python-checkins mailing list