diff options
Diffstat (limited to 'numpy/lib/tests')
-rw-r--r-- | numpy/lib/tests/test_io.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_io.py b/numpy/lib/tests/test_io.py index 5201b8e6e..c19660cf0 100644 --- a/numpy/lib/tests/test_io.py +++ b/numpy/lib/tests/test_io.py @@ -1425,6 +1425,10 @@ class TestFromTxt(LoadTxtBase): ('F', 25.0, 60.0)], dtype=descriptor) assert_equal(test, control) + def test_bad_fname(self): + with pytest.raises(TypeError, match='fname must be a string,'): + np.genfromtxt(123) + def test_commented_header(self): # Check that names can be retrieved even if the line is commented out. data = TextIO(""" |