summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_io.py
diff options
context:
space:
mode:
authorPauli Virtanen <pav@iki.fi>2010-07-17 18:14:26 +0000
committerPauli Virtanen <pav@iki.fi>2010-07-17 18:14:26 +0000
commit4f4558ae51354526b0a4c2d7bb1da8db040fb16c (patch)
treec713298c67384e58656b80ec2b7056a357beead8 /numpy/lib/tests/test_io.py
parent4bee2b42b48374dd5824e94c033327136bd6e35c (diff)
downloadnumpy-4f4558ae51354526b0a4c2d7bb1da8db040fb16c.tar.gz
3K: lib/tests: fix test_io.RoundtripTest on Python3 + Windows
Diffstat (limited to 'numpy/lib/tests/test_io.py')
-rw-r--r--numpy/lib/tests/test_io.py3
1 files changed, 2 insertions, 1 deletions
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)