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

REF: de-duplicate test_direct_arith_with_ndframe_returns_not_implemented #54410

Merged
merged 3 commits into from
Aug 4, 2023

Conversation

jbrockmendel
Copy link
Member

Also extends it to test for Index and all the arithmetic/comparison methods instead of just __add__. Uses a loop inside the test bc im leaning towards trying to slow the expansion of the test suite, but not super-opposed to parametrizing if reviewers have strong opinions.


op_names = tm.arithmetic_dunder_methods + tm.comparison_dunder_methods
op_names = [x for x in op_names if not x.startswith("__r")]
for op_name in op_names:
Copy link
Member

Choose a reason for hiding this comment

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

I prefer the ergonomics parameterizing this so that the test doesn't stop for a failure for just one op

Copy link
Member Author

Choose a reason for hiding this comment

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

ok will update

@mroeschke mroeschke added Testing pandas testing functions or related to the test suite ExtensionArray Extending pandas with custom dtypes or arrays. labels Aug 4, 2023
@mroeschke mroeschke added this to the 2.1 milestone Aug 4, 2023
@mroeschke mroeschke merged commit 23b3ac8 into pandas-dev:main Aug 4, 2023
32 checks passed
@mroeschke
Copy link
Member

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the ref-test-direct branch August 5, 2023 01:02
mroeschke pushed a commit to mroeschke/pandas that referenced this pull request Aug 18, 2023
…ted (pandas-dev#54410)

* REF: de-duplicate test_direct_arith_with_ndframe_returns_not_implemented

* parametrize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ExtensionArray Extending pandas with custom dtypes or arrays. Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants