mirror of
https://github.com/python/cpython.git
synced 2025-10-08 08:01:55 +00:00
Replace IOError with OSError (#16715)
This commit is contained in:
parent
16bdd4120d
commit
f7a17b48d7
121 changed files with 381 additions and 386 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue