From 54d0df69c0a57b5d5447f483494293354656c4fa Mon Sep 17 00:00:00 2001 From: Hirokazu Yamamoto Date: Fri, 6 Mar 2009 03:04:07 +0000 Subject: Issue #5334: array.fromfile() failed to insert values when EOFError was raised. Reviewed by Benjamin Peterson. --- Lib/test/test_array.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Lib/test/test_array.py') diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py index c8698bb40e..8e228391bc 100755 --- a/Lib/test/test_array.py +++ b/Lib/test/test_array.py @@ -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: -- cgit v1.2.1