Skip to content

TST: fix flaky xfail #28016

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

Merged
merged 2 commits into from
Aug 19, 2019
Merged

TST: fix flaky xfail #28016

merged 2 commits into from
Aug 19, 2019

Conversation

jbrockmendel
Copy link
Member

xfail in more specific circumstance

  • closes Flaky xfail on master #28011
  • tests added / passed
  • passes black pandas
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

)
def test_drop_duplicates_categorical_non_bool(self, dtype, ordered_fixture):
cat_array = np.array([1, 2, 3, 4, 5], dtype=np.dtype(dtype))

# Test case 1
input1 = np.array([1, 2, 3, 3], dtype=np.dtype(dtype))
tc1 = Series(Categorical(input1, categories=cat_array, ordered=ordered_fixture))
if dtype == "datetime64[D]":
# pre-empty flaky xfail, tc1 values are seemingly-random
Copy link
Contributor

Choose a reason for hiding this comment

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

Huh, I can't say that I understand why this would be.

Copy link
Member Author

Choose a reason for hiding this comment

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

in _recode_for_categories we're going through an ensure_object path and problems crop up around then. I'm not sure exactly why, but I think the solution will involve casting from datetime64[D] to datetime64[ns] without going through object

@TomAugspurger TomAugspurger added this to the 0.25.1 milestone Aug 19, 2019
@TomAugspurger TomAugspurger added the Unreliable Test Unit tests that occasionally fail label Aug 19, 2019
@TomAugspurger
Copy link
Contributor

SGTM. #27715 was backported, so we'll backport this as well.

@TomAugspurger TomAugspurger merged commit a4b0132 into pandas-dev:master Aug 19, 2019
meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Aug 19, 2019
@jbrockmendel jbrockmendel deleted the flaky branch August 19, 2019 18:41
EunSeop pushed a commit to EunSeop/pandas that referenced this pull request Aug 20, 2019
galuhsahid pushed a commit to galuhsahid/pandas that referenced this pull request Aug 25, 2019
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.

Flaky xfail on master
2 participants