From: Benjamin Peterson Date: Thu, 2 Apr 2009 01:03:17 +0000 (+0000) Subject: handle SEEK_ constants in test_io X-Git-Tag: v2.7a1~1613 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3633c4f7d24d07b1610ed39080e4bce79fd332db;p=python handle SEEK_ constants in test_io --- diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py index f0b38b6f7a..02533c91ca 100644 --- a/Lib/test/test_io.py +++ b/Lib/test/test_io.py @@ -1299,13 +1299,13 @@ class MiscIOTest(unittest.TestCase): def testImport__all__(self): for name in io.__all__: obj = getattr(io, name, None) - self.assert_(obj is not None, name) + self.assertTrue(obj is not None, name) if name == "open": continue elif "error" in name.lower(): - self.assert_(issubclass(obj, Exception), name) - else: - self.assert_(issubclass(obj, io.IOBase)) + self.assertTrue(issubclass(obj, Exception), name) + elif not name.startswith("SEEK_"): + self.assertTrue(issubclass(obj, io.IOBase)) def test_attributes(self):