summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-05-24 19:02:32 (GMT)
committerGuido van Rossum <guido@python.org>2007-05-24 19:02:32 (GMT)
commit2c94aa567e525c82041ad68a3174d8c3acbf37e2 (patch)
tree959b7864bfb83c8bc73e3f011603975277c090c7 /Lib/test
parent6c037ba7dcb67863edf538d39d73941c7811dd14 (diff)
downloadcpython-2c94aa567e525c82041ad68a3174d8c3acbf37e2.zip
cpython-2c94aa567e525c82041ad68a3174d8c3acbf37e2.tar.gz
cpython-2c94aa567e525c82041ad68a3174d8c3acbf37e2.tar.bz2
Fixed array.fromfile(); removed references to PyFileObject in array.tofile().
Fixed test_array by removing tests that these two functions don't work with cStringIO objects (which makes no sense).
Diffstat (limited to 'Lib/test')
-rwxr-xr-xLib/test/test_array.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py
index 07a796f..2eb64f3 100755
--- a/Lib/test/test_array.py
+++ b/Lib/test/test_array.py
@@ -6,7 +6,7 @@
import unittest
from test import test_support
from weakref import proxy
-import array, cStringIO, math
+import array, io, math
from pickle import loads, dumps
class ArraySubclass(array.array):
@@ -162,7 +162,6 @@ 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())
f = open(test_support.TESTFN, 'wb')
try:
a.tofile(f)
@@ -170,11 +169,6 @@ class BaseTest(unittest.TestCase):
b = array.array(self.typecode)
f = open(test_support.TESTFN, 'rb')
self.assertRaises(TypeError, b.fromfile)
- self.assertRaises(
- TypeError,
- b.fromfile,
- cStringIO.StringIO(), len(self.example)
- )
b.fromfile(f, len(self.example))
self.assertEqual(b, array.array(self.typecode, self.example))
self.assertNotEqual(a, b)