Make array().tofile() work with a new I/O object.

This commit is contained in:
Guido van Rossum 2007-04-11 17:08:28 +00:00
parent d0712817ac
commit b5ddcfd2a2
2 changed files with 30 additions and 6 deletions

View file

@ -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)