diff options
| author | Ross Barnowski <rossbar@berkeley.edu> | 2022-01-28 14:09:22 -0800 |
|---|---|---|
| committer | Ross Barnowski <rossbar@berkeley.edu> | 2022-01-28 14:09:22 -0800 |
| commit | 59c20848a53402bfcf70625390391054aabac760 (patch) | |
| tree | 77277e40dcba7f5bbef2aec3bb616ef36055e810 /numpy/lib/tests | |
| parent | 5332a41ddc2d0ebd37c732808253145d5b528b0a (diff) | |
| download | numpy-59c20848a53402bfcf70625390391054aabac760.tar.gz | |
TST: Fix exception msg matching in tests.
Diffstat (limited to 'numpy/lib/tests')
| -rw-r--r-- | numpy/lib/tests/test_loadtxt.py | 10 |
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) |
