Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pandas/tests/arrays/categorical/test_algos.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def test_take_bounds(self, allow_fill):
if allow_fill:
msg = "indices are out-of-bounds"
else:
msg = "index 4 is out of bounds for size 3"
msg = "index 4 is out of bounds for( axis 0 with|) size 3"
with pytest.raises(IndexError, match=msg):
cat.take([4, 5], allow_fill=allow_fill)

Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/indexes/multi/test_analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def test_take_fill_value():
with pytest.raises(ValueError, match=msg):
idx.take(np.array([1, 0, -5]), fill_value=True)

msg = "index -5 is out of bounds for size 4"
msg = "index -5 is out of bounds for( axis 0 with|) size 4"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: small preference for "( axis 0 with)?" over "( axis 0 with|)"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(ok for follow-up, since getting the CI working quickly will be nice)

with pytest.raises(IndexError, match=msg):
idx.take(np.array([1, -5]))

Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/indexes/period/test_indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ def test_take_fill_value(self):
with pytest.raises(ValueError, match=msg):
idx.take(np.array([1, 0, -5]), fill_value=True)

msg = "index -5 is out of bounds for size 3"
msg = "index -5 is out of bounds for( axis 0 with|) size 3"
with pytest.raises(IndexError, match=msg):
idx.take(np.array([1, -5]))

Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/series/indexing/test_indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ def test_take():
expected = Series([4, 2, 4], index=[4, 3, 4])
tm.assert_series_equal(actual, expected)

msg = "index {} is out of bounds for size 5"
msg = "index {} is out of bounds for( axis 0 with|) size 5"
with pytest.raises(IndexError, match=msg.format(10)):
s.take([1, 10])
with pytest.raises(IndexError, match=msg.format(5)):
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/test_take.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ def test_bounds_check_large(self):
with pytest.raises(IndexError, match=msg):
algos.take(arr, [2, 3], allow_fill=True)

msg = "index 2 is out of bounds for size 2"
msg = "index 2 is out of bounds for( axis 0 with|) size 2"
with pytest.raises(IndexError, match=msg):
algos.take(arr, [2, 3], allow_fill=False)

Expand Down