-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: IntervalIndex.intersection returning duplicates #38834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
can you also add the exhaustive test from the op
except use the index fixture |
Done, moved it into the regular setops file. |
thanks @phofl |
# No duplicates in empty indexes | ||
return | ||
|
||
def check_intersection_commutative(left, right): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ive been thinking we should make something like this of the form
@pytest.mark.parametrize("method", ["union", "intersection", "symmetric_difference"])
def test_setops_commute(method, index, index_fixture2):
[...]
we've consolidated a lot of the behavior recently, but we still have some length-0 checks and self.equals(other) checks that seem a little wobbly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that sounds reasonable
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
Moved the wrong test code into a new test with adjusted behavior