mirror of
https://github.com/python/cpython.git
synced 2025-07-31 07:04:42 +00:00
handle SEEK_ constants in test_io
This commit is contained in:
parent
7b0f1540ea
commit
3633c4f7d2
1 changed files with 4 additions and 4 deletions
|
@ -1299,13 +1299,13 @@ class MiscIOTest(unittest.TestCase):
|
||||||
def testImport__all__(self):
|
def testImport__all__(self):
|
||||||
for name in io.__all__:
|
for name in io.__all__:
|
||||||
obj = getattr(io, name, None)
|
obj = getattr(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, io.IOBase))
|
self.assertTrue(issubclass(obj, io.IOBase))
|
||||||
|
|
||||||
|
|
||||||
def test_attributes(self):
|
def test_attributes(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue