-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: Clean reductions/test_reductions.py #32035
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
@pytest.mark.parametrize("dtype", ["M8[ns]", "datetime64[ns, UTC]"]) | ||
def test_nanops_empty_object(self, opname, index_or_series, dtype): | ||
klass = index_or_series | ||
arg_op = "arg" + opname if klass is Index else "idx" + opname |
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.
why is this needed?
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.
I broke this into its own test since it allows for parametrizing over these dtypes without repeating all of test_nanops
(which was / is pretty big), and this was conceptually a bit more specific than just "testing nanops"
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.
i get that, but why is arg_op specifically needed? what is its purpose
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.
Oh, I think the name of the method being tested changes if it's a Series or Index (idxmin or argmin) so it has to be created dynamically in the test?
thanks @dsaxton |
Some more parameterizing / splitting up of tests