Skip to content
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

Fix flakey base setitem test #30660

Merged
merged 1 commit into from
Jan 3, 2020

Conversation

TomAugspurger
Copy link
Contributor

This test makes a potentially incorrect assertion about the data provided to the test. We already require that data[0] != data[1], so it can be used instead.

This failed in https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=24731&view=logs&j=a67b4c4c-cd2e-5e3c-a361-de73ac9c05f9&t=33d2fdd0-c376-5f94-e6d3-957bdd23a3b8.

@TomAugspurger TomAugspurger added this to the 1.0 milestone Jan 3, 2020
@TomAugspurger TomAugspurger added the Unreliable Test Unit tests that occasionally fail label Jan 3, 2020
@@ -189,11 +189,9 @@ def test_setitem_scalar_key_sequence_raise(self, data):

def test_setitem_preserves_views(self, data):
# GH#28150 setitem shouldn't swap the underlying data
assert data[-1] != data[0] # otherwise test would not be meaningful
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we start with data[0] == data[1] then the assertions below aren't testing anything useful. some of the data fixtures check for a condition similar to this one

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We require that they be unequal:

* data[0] and data[1] should not be equal

@jbrockmendel
Copy link
Member

Thanks @TomAugspurger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Unreliable Test Unit tests that occasionally fail
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants