Skip to content

Commit 3b5974d

Browse files
committed
Fix test
1 parent f2016ec commit 3b5974d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pandas/tests/frame/methods/test_rank.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,10 +470,14 @@ def test_rank_inf_nans_na_option(
470470
("top", False, [2.0, 3.0, 1.0, 4.0]),
471471
],
472472
)
473-
def test_rank_object_first(self, frame_or_series, na_option, ascending, expected):
473+
def test_rank_object_first(
474+
self, frame_or_series, na_option, ascending, expected, using_infer_string
475+
):
474476
obj = frame_or_series(["foo", "foo", None, "foo"])
475477
result = obj.rank(method="first", na_option=na_option, ascending=ascending)
476478
expected = frame_or_series(expected)
479+
if using_infer_string:
480+
expected = expected.astype("uint64")
477481
tm.assert_equal(result, expected)
478482

479483
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)