mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
Issue #5334: array.fromfile() failed to insert values when EOFError was raised.
Reviewed by Benjamin Peterson.
This commit is contained in:
parent
3aed8d5110
commit
54d0df69c0
3 changed files with 14 additions and 8 deletions
|
@ -174,9 +174,8 @@ class BaseTest(unittest.TestCase):
|
|||
b.fromfile(f, len(self.example))
|
||||
self.assertEqual(b, array.array(self.typecode, self.example))
|
||||
self.assertNotEqual(a, b)
|
||||
b.fromfile(f, len(self.example))
|
||||
self.assertRaises(EOFError, b.fromfile, f, len(self.example)+1)
|
||||
self.assertEqual(a, b)
|
||||
self.assertRaises(EOFError, b.fromfile, f, 1)
|
||||
f.close()
|
||||
finally:
|
||||
if not f.closed:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue