diff options
Diffstat (limited to 'numpy/lib/tests/test_io.py')
-rw-r--r-- | numpy/lib/tests/test_io.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py index 1ed333165..53068838a 100644 --- a/numpy/lib/tests/test_io.py +++ b/numpy/lib/tests/test_io.py @@ -488,7 +488,7 @@ class TestLoadTxt(TestCase): def test_generator_source(self): def count(): for i in range(10): - yield "%d" % i + yield asbytes("%d" % i) res = np.loadtxt(count()) assert_array_equal(res, np.arange(10)) @@ -1323,6 +1323,14 @@ M 33 21.99 os.close(f) os.unlink(name) + def test_gft_generator_source(self): + def count(): + for i in range(10): + yield asbytes("%d" % i) + + res = np.genfromtxt(count()) + assert_array_equal(res, np.arange(10)) + def test_gzip_load(): a = np.random.random((5, 5)) |