Skip to content

Commit 9ea7689

Browse files
committed
new test
1 parent 47eb219 commit 9ea7689

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pandas/tests/reshape/concat/test_index.py

+8
Original file line numberDiff line numberDiff line change
@@ -257,3 +257,11 @@ def test_concat_multiindex_dfs_with_deepcopy(self):
257257
tm.assert_frame_equal(result_copy, expected)
258258
result_no_copy = concat(example_dict, names=["testname"])
259259
tm.assert_frame_equal(result_no_copy, expected)
260+
261+
def test_concat_multiindex_unique(self):
262+
# GH#44786
263+
df1 = DataFrame({"col": ["a", "b", "c"]}, index=["1", "2", "2"])
264+
df2 = concat([df1], keys=["X"])
265+
result = np.array([df2.index.is_unique])
266+
expected = np.array([False])
267+
tm.assert_numpy_array_equal(result, expected)

0 commit comments

Comments
 (0)