summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_array.py
diff options
context:
space:
mode:
authorHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2009-03-06 03:04:07 (GMT)
committerHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2009-03-06 03:04:07 (GMT)
commit54d0df69c0a57b5d5447f483494293354656c4fa (patch)
tree37c4c0e898a6fefb53359f83d5d6b23e23d1e992 /Lib/test/test_array.py
parent3aed8d511014df6409758706e5179aeeb7cc80ee (diff)
downloadcpython-54d0df69c0a57b5d5447f483494293354656c4fa.zip
cpython-54d0df69c0a57b5d5447f483494293354656c4fa.tar.gz
cpython-54d0df69c0a57b5d5447f483494293354656c4fa.tar.bz2
Issue #5334: array.fromfile() failed to insert values when EOFError was raised.
Reviewed by Benjamin Peterson.
Diffstat (limited to 'Lib/test/test_array.py')
-rwxr-xr-xLib/test/test_array.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py
index c8698bb..8e22839 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: