summaryrefslogtreecommitdiff
path: root/numpy/lib/tests
diff options
context:
space:
mode:
authorRoss Barnowski <rossbar@berkeley.edu>2022-01-28 14:09:22 -0800
committerRoss Barnowski <rossbar@berkeley.edu>2022-01-28 14:09:22 -0800
commit59c20848a53402bfcf70625390391054aabac760 (patch)
tree77277e40dcba7f5bbef2aec3bb616ef36055e810 /numpy/lib/tests
parent5332a41ddc2d0ebd37c732808253145d5b528b0a (diff)
downloadnumpy-59c20848a53402bfcf70625390391054aabac760.tar.gz
TST: Fix exception msg matching in tests.
Diffstat (limited to 'numpy/lib/tests')
-rw-r--r--numpy/lib/tests/test_loadtxt.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/numpy/lib/tests/test_loadtxt.py b/numpy/lib/tests/test_loadtxt.py
index e2f93534c..4d42917eb 100644
--- a/numpy/lib/tests/test_loadtxt.py
+++ b/numpy/lib/tests/test_loadtxt.py
@@ -879,17 +879,17 @@ class TestCReaderUnitTests:
def test_delimiter_comment_collision_raises():
- with pytest.raises(TypeError, match="control characters.*are identical"):
+ with pytest.raises(TypeError, match=".*control characters.*incompatible"):
np.loadtxt(StringIO("1, 2, 3"), delimiter=",", comments=",")
def test_delimiter_quotechar_collision_raises():
- with pytest.raises(TypeError, match="control characters.*are identical"):
+ with pytest.raises(TypeError, match=".*control characters.*incompatible"):
np.loadtxt(StringIO("1, 2, 3"), delimiter=",", quotechar=",")
def test_comment_quotechar_collision_raises():
- with pytest.raises(TypeError, match="control characters.*are identical"):
+ with pytest.raises(TypeError, match=".*control characters.*incompatible"):
np.loadtxt(StringIO("1 2 3"), comments="#", quotechar="#")
@@ -911,9 +911,9 @@ def test_delimiter_and_multiple_comments_collision_raises():
)
)
def test_collision_with_default_delimiter_raises(ws):
- with pytest.raises(TypeError, match="control characters.*are identical"):
+ with pytest.raises(TypeError, match=".*control characters.*incompatible"):
np.loadtxt(StringIO(f"1{ws}2{ws}3\n4{ws}5{ws}6\n"), comments=ws)
- with pytest.raises(TypeError, match="control characters.*are identical"):
+ with pytest.raises(TypeError, match=".*control characters.*incompatible"):
np.loadtxt(StringIO(f"1{ws}2{ws}3\n4{ws}5{ws}6\n"), quotechar=ws)