Merged revisions 71014 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r71014 | benjamin.peterson | 2009-04-01 20:03:17 -0500 (Wed, 01 Apr 2009) | 1 line

  handle SEEK_ constants in test_io
........
This commit is contained in:
Benjamin Peterson 2009-04-02 01:13:40 +00:00
parent 8d5fd4ed5c
commit bfb959404f
1 changed files with 4 additions and 4 deletions

View File

@ -1996,13 +1996,13 @@ class MiscIOTest(unittest.TestCase):
def test___all__(self): def test___all__(self):
for name in self.io.__all__: for name in self.io.__all__:
obj = getattr(self.io, name, None) obj = getattr(self.io, name, None)
self.assert_(obj is not None, name) self.assertTrue(obj is not None, name)
if name == "open": if name == "open":
continue continue
elif "error" in name.lower(): elif "error" in name.lower():
self.assert_(issubclass(obj, Exception), name) self.assertTrue(issubclass(obj, Exception), name)
else: elif not name.startswith("SEEK_"):
self.assert_(issubclass(obj, self.IOBase), name) self.assertTrue(issubclass(obj, self.IOBase))
def test_attributes(self): def test_attributes(self):
f = self.open(support.TESTFN, "wb", buffering=0) f = self.open(support.TESTFN, "wb", buffering=0)