Skip to content

Commit c724ba0

Browse files
tightened the pytest.raises condition
1 parent 2162158 commit c724ba0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/tests/indexing/test_na_indexing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def test_series_mask_boolean(values, dtype, mask, indexer_class, frame):
4343

4444
msg = "iLocation based boolean indexing cannot use an indexable as a mask"
4545
if indexer_class is pd.Series:
46-
with pytest.raises((ValueError, TypeError), match=msg):
46+
with pytest.raises(ValueError, match=msg):
4747
result = ser.iloc[mask]
4848
tm.assert_equal(result, expected)
4949
else:
@@ -91,7 +91,7 @@ def test_series_mask_boolean_empty(dtype, indexer_class, frame):
9191

9292
msg = "iLocation based boolean indexing cannot use an indexable as a mask"
9393
if indexer_class is pd.Series:
94-
with pytest.raises((ValueError, TypeError), match=msg):
94+
with pytest.raises(ValueError, match=msg):
9595
result = ser.iloc[mask]
9696
tm.assert_equal(result, expected)
9797
else:

0 commit comments

Comments
 (0)