Skip to content

Commit 5516275

Browse files
fix check for string dtype in tests
1 parent 460e60a commit 5516275

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pandas/tests/indexes/test_old_base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,9 @@ def test_insert_out_of_bounds(self, index, using_infer_string):
451451
else:
452452
msg = "slice indices must be integers or None or have an __index__ method"
453453

454-
if using_infer_string and (index.dtype == "str" or index.dtype == "category"): # noqa: PLR1714
454+
if using_infer_string and (
455+
index.dtype == "string" or index.dtype == "category" # noqa: PLR1714
456+
):
455457
msg = "loc must be an integer between"
456458

457459
with pytest.raises(err, match=msg):

0 commit comments

Comments
 (0)