summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_io.py
diff options
context:
space:
mode:
authorThomas Green <tomgreen66@hotmail.com>2021-12-08 11:57:10 +0000
committerGitHub <noreply@github.com>2021-12-08 11:57:10 +0000
commitdc766fc1abb546ab883f76ef4e405e99e9287ab6 (patch)
tree9e7c7748ba8bfbb2ba5224633b0725909712d2fa /numpy/lib/tests/test_io.py
parent1cfdac82ac793061d8ca4b07c046fc6b21ee7e54 (diff)
parentab7a1927353ab9dd52e3f2f7a1a889ae790667b9 (diff)
downloadnumpy-dc766fc1abb546ab883f76ef4e405e99e9287ab6.tar.gz
Merge branch 'numpy:main' into armcompiler
Diffstat (limited to 'numpy/lib/tests/test_io.py')
-rw-r--r--numpy/lib/tests/test_io.py4
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("""