Skip to content

Commit 7adc291

Browse files
author
wdyy20041223
committed
TST: Add regression tests for enlarging MultiIndex with None keys (GH#59153)
1 parent 70f7204 commit 7adc291

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pandas/tests/indexing/multiindex/test_setitem.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -510,8 +510,8 @@ def test_setitem_enlargement_multiindex_with_none(self):
510510
index=expected_index,
511511
columns=[0, 1],
512512
)
513-
514-
tm.assert_frame_equal(df, expected, check_exact=False)
513+
# check_index_type=False because None in MultiIndex causes mixed inferred_type
514+
tm.assert_frame_equal(df, expected, check_index_type=False)
515515

516516
# Test retrieval of the newly added row
517517
result = df.loc[("A", None), :]
@@ -543,8 +543,8 @@ def test_setitem_enlargement_multiindex_multiple_none(self):
543543
index=expected_index,
544544
columns=["x", "y"],
545545
)
546-
547-
tm.assert_frame_equal(df, expected, check_exact=False)
546+
# check_index_type=False because None in MultiIndex causes mixed inferred_type
547+
tm.assert_frame_equal(df, expected, check_index_type=False)
548548

549549

550550

0 commit comments

Comments
 (0)