Replace IOError with OSError (#16715)

This commit is contained in:
Andrew Svetlov 2012-12-25 16:47:37 +02:00
parent 16bdd4120d
commit f7a17b48d7
121 changed files with 381 additions and 386 deletions

View file

@ -355,12 +355,12 @@ class BaseTest(unittest.TestCase):
support.unlink(support.TESTFN)
def test_fromfile_ioerror(self):
# Issue #5395: Check if fromfile raises a proper IOError
# Issue #5395: Check if fromfile raises a proper OSError
# instead of EOFError.
a = array.array(self.typecode)
f = open(support.TESTFN, 'wb')
try:
self.assertRaises(IOError, a.fromfile, f, len(self.example))
self.assertRaises(OSError, a.fromfile, f, len(self.example))
finally:
f.close()
support.unlink(support.TESTFN)