Skip to content
Prev Previous commit
Next Next commit
Update the error message in test_indexing.py
  • Loading branch information
natmokval authored Dec 18, 2025
commit 976ea803d5ba58b6e6b51a1cb7d918a9ace67a03
7 changes: 2 additions & 5 deletions pandas/tests/series/indexing/test_indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,11 +404,8 @@ def test_setitem_empty_indexer(indexer, val):
tm.assert_frame_equal(df, expected)


def test_loc_non_monotonic_index_with_non_specific_label():
msg = (
"Cannot get left slice bound for non-monotonic "
"index with a non-specific label: 4"
)
def test_loc_non_monotonic_index_with_missing_label():
msg = "Cannot get left slice bound for non-monotonic index with a missing label 4"
ser = Series([3, 6, 7, 6], index=[3, 8, 7, 6])
with pytest.raises(KeyError, match=msg):
ser.loc[4:7]
Expand Down
Loading