From 4f4558ae51354526b0a4c2d7bb1da8db040fb16c Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Sat, 17 Jul 2010 18:14:26 +0000 Subject: 3K: lib/tests: fix test_io.RoundtripTest on Python3 + Windows --- numpy/lib/tests/test_io.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'numpy/lib/tests/test_io.py') diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py index d7becc284..25fa6faf4 100644 --- a/numpy/lib/tests/test_io.py +++ b/numpy/lib/tests/test_io.py @@ -23,6 +23,7 @@ if sys.version_info[0] >= 3: return BytesIO(asbytes(s)) else: from StringIO import StringIO + BytesIO = StringIO MAJVER, MINVER = sys.version_info[:2] @@ -76,7 +77,7 @@ class RoundtripTest(object): target_file.flush() target_file.seek(0) - if sys.platform == 'win32' and not isinstance(target_file, StringIO): + if sys.platform == 'win32' and not isinstance(target_file, BytesIO): target_file.close() arr_reloaded = np.load(load_file, **load_kwds) -- cgit v1.2.1