Skip to content

Commit 12c1c4a

Browse files
committed
fixing test cases
1 parent c37cfb3 commit 12c1c4a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/tests/indexes/test_base.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,8 @@ def test_format_missing(self, vals, nulls_fixture):
658658
index = Index(vals)
659659

660660
formatted = index.format()
661-
expected = [str(index[0]), str(index[1]), str(index[2]), "NaN"]
661+
null_repr = "NaN" if isinstance(nulls_fixture, float) else str(nulls_fixture)
662+
expected = [str(index[0]), str(index[1]), str(index[2]), null_repr]
662663

663664
assert formatted == expected
664665
assert index[3] is nulls_fixture

0 commit comments

Comments
 (0)