Skip to content

Commit cfb2f09

Browse files
update teset
1 parent bdfd2d3 commit cfb2f09

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pandas/tests/indexes/object/test_indexing.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,13 @@ def test_get_indexer_with_NA_values(
6565

6666
@td.skip_if_no("pyarrow")
6767
def test_get_indexer_infer_string_missing_values(self):
68-
# GH#55834
68+
# ensure the passed list is not cast to string but to object so that
69+
# the None value is matched in the index
70+
# https://github.com/pandas-dev/pandas/issues/55834
6971
idx = Index(["a", "b", None], dtype="object")
7072
result = idx.get_indexer([None, "x"])
71-
expected = np.array([2, -1])
72-
tm.assert_numpy_array_equal(result, expected, check_dtype=False)
73+
expected = np.array([2, -1], dtype=np.intp)
74+
tm.assert_numpy_array_equal(result, expected)
7375

7476

7577
class TestGetIndexerNonUnique:

0 commit comments

Comments
 (0)