mirror of https://github.com/python/cpython
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:
parent
8d5fd4ed5c
commit
bfb959404f
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue