Skip to content

Commit bb855f2

Browse files
committed
Adjust tests to cover all cases
1 parent d83f3c4 commit bb855f2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pandas/tests/indexes/multi/test_setops.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,11 +510,10 @@ def test_union_nan_got_duplicated():
510510

511511
def test_union_duplicates(index):
512512
# GH#38977
513-
# Index has to be sorted as of now.
514513
if index.empty or isinstance(index, (IntervalIndex, CategoricalIndex)):
515514
# No duplicates in empty indexes
516515
return
517-
values = index.unique().sort_values().values.tolist()
516+
values = index.unique().values.tolist()
518517
mi1 = MultiIndex.from_arrays([values, [1] * len(values)])
519518
mi2 = MultiIndex.from_arrays([[values[0]] + values, [1] * (len(values) + 1)])
520519
result = mi1.union(mi2)

0 commit comments

Comments
 (0)