Skip to content

Commit c220d44

Browse files
VijayantSoniMateusz Górski
authored and
Mateusz Górski
committed
Adding test for assert_equal_index with empty iterables (pandas-dev#29211)
* Adding test for assert_equal_index with empty iterables * Adding issue # in comment * formatted file using black * Move test to indexes/multi/test_constructor.py
1 parent 64a725a commit c220d44

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pandas/tests/indexes/multi/test_constructor.py

+7
Original file line numberDiff line numberDiff line change
@@ -722,3 +722,10 @@ def test_from_frame_invalid_names(names, expected_error_msg):
722722
)
723723
with pytest.raises(ValueError, match=expected_error_msg):
724724
pd.MultiIndex.from_frame(df, names=names)
725+
726+
727+
def test_index_equal_empty_iterable():
728+
# #16844
729+
a = MultiIndex(levels=[[], []], codes=[[], []], names=["a", "b"])
730+
b = MultiIndex.from_arrays(arrays=[[], []], names=["a", "b"])
731+
tm.assert_index_equal(a, b)

0 commit comments

Comments
 (0)