Skip to content

TST: fix _most_ remaining xfails in tests/arithmetic #23308

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

Closed
wants to merge 13 commits into from

Conversation

jbrockmendel
Copy link
Member

Most of the remaining xfails in tests/arithmetic are caused by single-column DataFrame operations not being equivalent to Series/Index operations. This PR fixes those tests by transposing both the DataFrame and the expected result in the appropriate cases.

We end up with 3 xfailed tests instead of 223. Runtime drops from 168.9 seconds to 99.4 seconds.

Some other ancillary fixes along the way: RangeIndex correctly returns NotImplemented when operating with a DataFrame. Series operations with Tick and non-nano timedelta64 are fixed.

@pep8speaks
Copy link

pep8speaks commented Oct 24, 2018

Hello @jbrockmendel! Thanks for updating the PR.

file_to_check.py:2528:-258: W605 invalid escape sequence '('
file_to_check.py:2528:-255: W605 invalid escape sequence ')'


Comment last updated on October 24, 2018 at 01:34 Hours UTC

@jbrockmendel
Copy link
Member Author

Mutually exclusive with #23306; should be done after #23240.

# In particular non-nanosecond timedelta64 needs to be cast to
# nanoseconds, or else we get undesired behavior like
# np.timedelta64(3, 'D') / 2 == np.timedelta64(1, 'D')
return pd.Timedelta(obj)
Copy link
Member Author

Choose a reason for hiding this comment

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

FIXME: this will screw up on np.timedelta64(“nat”)

@jbrockmendel
Copy link
Member Author

This should be put on hold until after #23320.

@jbrockmendel
Copy link
Member Author

Closing until after #23320.

@jbrockmendel jbrockmendel deleted the noxfail branch April 5, 2020 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants