use assert[Not]In where appropriate

This commit is contained in:
Ezio Melotti 2010-01-23 15:40:09 +00:00
parent 0f77f465ff
commit b58e0bd8bb
39 changed files with 176 additions and 173 deletions

View file

@ -28,8 +28,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():