summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2008-03-18 06:03:46 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2008-03-18 06:03:46 (GMT)
commitd1befd7c50157d39d73f78c6f3ed3440e4369723 (patch)
tree31041e7b0c04ee1ee8638d3d88eb51cf6263fd8c /Lib
parent36dbcb9e98ef9f3fdc731f42670b7dfd1154c6d8 (diff)
downloadcpython-d1befd7c50157d39d73f78c6f3ed3440e4369723.zip
cpython-d1befd7c50157d39d73f78c6f3ed3440e4369723.tar.gz
cpython-d1befd7c50157d39d73f78c6f3ed3440e4369723.tar.bz2
Add some info to the failure messages
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/test/test_errno.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_errno.py b/Lib/test/test_errno.py
index e42c86d..cab5f33 100755
--- a/Lib/test/test_errno.py
+++ b/Lib/test/test_errno.py
@@ -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():