summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_io.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/tests/test_io.py')
-rw-r--r--numpy/lib/tests/test_io.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py
index f545bfe34..d4f7f0e97 100644
--- a/numpy/lib/tests/test_io.py
+++ b/numpy/lib/tests/test_io.py
@@ -3,6 +3,7 @@ import numpy.ma as ma
from numpy.ma.testutils import *
import StringIO
+import gzip
from tempfile import NamedTemporaryFile
import sys, time
@@ -821,6 +822,13 @@ def test_gzip_load():
f = gzip.GzipFile(fileobj=s, mode="r")
assert_array_equal(np.load(f), a)
+def test_gzip_loadtxt():
+ f = NamedTemporaryFile(suffix='.gz')
+ g = gzip.GzipFile(fileobj=f)
+ g.write('1 2 3\n')
+ g.close()
+ f.seek(0)
+ assert_array_equal(np.loadtxt(f.name), [1, 2, 3])
if __name__ == "__main__":
run_module_suite()