diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2011-05-07 18:15:34 +0300 |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2011-05-07 18:15:34 +0300 |
commit | 17736f19671fe9e3a1d0965abf6e0d022c3c7b7f (patch) | |
tree | 53cdecfea95a81b6ef7326980cf5e81328b32b06 /Lib/test/test_errno.py | |
parent | 2c515bbdb8fc7fd4cc3d01151d0b8dd8d5adccfd (diff) | |
parent | 496564fe5be17057671a373f4a1126352823ece5 (diff) | |
download | cpython-17736f19671fe9e3a1d0965abf6e0d022c3c7b7f.tar.gz |
#12017: merge with 3.1.
Diffstat (limited to 'Lib/test/test_errno.py')
-rwxr-xr-x | Lib/test/test_errno.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/test/test_errno.py b/Lib/test/test_errno.py index 80edcc680a..f414a87796 100755 --- a/Lib/test/test_errno.py +++ b/Lib/test/test_errno.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 """Test the errno module Roger E. Masse """ @@ -20,7 +20,8 @@ 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.values(): - self.assertTrue(hasattr(errno, value), 'no %s attr in errno' % value) + self.assertTrue(hasattr(errno, value), + 'no %s attr in errno' % value) class ErrorcodeTests(unittest.TestCase): @@ -28,8 +29,8 @@ class ErrorcodeTests(unittest.TestCase): def test_attributes_in_errorcode(self): for attribute in errno.__dict__.keys(): if attribute.isupper(): - self.assertTrue(getattr(errno, attribute) in errno.errorcode, - 'no %s attr in errno.errorcode' % attribute) + self.assertIn(getattr(errno, attribute), errno.errorcode, + 'no %s attr in errno.errorcode' % attribute) def test_main(): |