Skip to content

Commit

Permalink
Don't skip because of duplicates
Browse files Browse the repository at this point in the history
  • Loading branch information
mroeschke committed Nov 17, 2023
1 parent 8a4e1c1 commit 9fe92b0
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions pandas/tests/indexes/test_setops.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,9 @@ def test_corner_union(self, index_flat, fname, sname, expected_name):
)
def test_union_unequal(self, index_flat, fname, sname, expected_name):
if not index_flat.is_unique:
pytest.skip("Randomly generated index_flat was not unique.")
index = index_flat
index = index_flat.unique()
else:
index = index_flat

# test copy.union(subset) - need sort for unicode and string
first = index.copy().set_names(fname)
Expand All @@ -388,8 +389,9 @@ def test_corner_intersect(self, index_flat, fname, sname, expected_name):
# GH#35847
# Test intersections with various name combinations
if not index_flat.is_unique:
pytest.skip("Randomly generated index_flat was not unique.")
index = index_flat
index = index_flat.unique()
else:
index = index_flat

# Test copy.intersection(copy)
first = index.copy().set_names(fname)
Expand Down Expand Up @@ -431,8 +433,9 @@ def test_corner_intersect(self, index_flat, fname, sname, expected_name):
)
def test_intersect_unequal(self, index_flat, fname, sname, expected_name):
if not index_flat.is_unique:
pytest.skip("Randomly generated index_flat was not unique.")
index = index_flat
index = index_flat.unique()
else:
index = index_flat

# test copy.intersection(subset) - need sort for unicode and string
first = index.copy().set_names(fname)
Expand Down

0 comments on commit 9fe92b0

Please sign in to comment.