Skip to content

TST: fixturize, collect #44242

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 6 commits into from
Oct 31, 2021
Merged

TST: fixturize, collect #44242

merged 6 commits into from
Oct 31, 2021

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx
  • tests added / passed
  • Ensure all linting tests pass, see here for how to run them
  • whatsnew entry

@jreback jreback added the Testing pandas testing functions or related to the test suite label Oct 30, 2021
@jreback jreback added this to the 1.4 milestone Oct 30, 2021
@@ -921,6 +921,23 @@ def all_binary_operators(request):
return request.param


@pytest.fixture(
Copy link
Contributor

@jreback jreback Oct 30, 2021

Choose a reason for hiding this comment

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

isn't this all_compare_operators in this file ?

Copy link
Contributor

Choose a reason for hiding this comment

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

we don't really distinguish the naming here. e.g. for arithmetic we have
all_binary_operations (using operator) and all_arithmetic_operators.

so ideally have some good pattern here.

maybe
all_comparison_operators (use operator)
all_comparison_dunder (use dunder)

would have to fix a bunch of things but prob worth it.

Copy link
Member Author

Choose a reason for hiding this comment

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

yah not something i want to futz with

Copy link
Contributor

Choose a reason for hiding this comment

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

sure but we cannot add it like this, so need to do something. e.g. move next to the others & rename this one to conform.

Copy link
Member Author

Choose a reason for hiding this comment

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

will move this down adjacent to all_compare_operators

Copy link
Member Author

Choose a reason for hiding this comment

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

looks like most of the places here we use the dunder one then do a getattr(operator, all_comparison_operators.strip("__")), so will just replace those usages with this

@jbrockmendel
Copy link
Member Author

jbrockmendel commented Oct 31, 2021 via email

@pytest.mark.parametrize("box", [pd.Series, pd.DataFrame])
def test_direct_arith_with_ndframe_returns_not_implemented(self, data, box):
def test_direct_arith_with_ndframe_returns_not_implemented(
self, data, frame_or_series
Copy link
Member

Choose a reason for hiding this comment

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

Those base extension tests are used by downstream projects, so we should be a bit more careful with changing them (at least when for "clean up" purposes). Or use fixtures defined in tests/extension/conftest.py as you did in #44138.
I have changed back this specific line in #44332

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

Successfully merging this pull request may close these issues.

3 participants