mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
Make array().tofile() work with a new I/O object.
This commit is contained in:
parent
d0712817ac
commit
b5ddcfd2a2
2 changed files with 30 additions and 6 deletions
|
@ -147,7 +147,7 @@ class BaseTest(unittest.TestCase):
|
|||
def test_tofromfile(self):
|
||||
a = array.array(self.typecode, 2*self.example)
|
||||
self.assertRaises(TypeError, a.tofile)
|
||||
self.assertRaises(TypeError, a.tofile, cStringIO.StringIO())
|
||||
##self.assertRaises(TypeError, a.tofile, cStringIO.StringIO())
|
||||
f = open(test_support.TESTFN, 'wb')
|
||||
try:
|
||||
a.tofile(f)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue