Skip to content

CLN: Remove unused fixtures #36699

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 5 commits into from
Sep 30, 2020
Merged

CLN: Remove unused fixtures #36699

merged 5 commits into from
Sep 30, 2020

Conversation

dsaxton
Copy link
Member

@dsaxton dsaxton commented Sep 28, 2020

No description provided.

@dsaxton dsaxton added Testing pandas testing functions or related to the test suite Clean labels Sep 28, 2020
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

prefer to be less aggressive on these removals

most are ok - noted some

@@ -42,21 +42,11 @@ def arithmetic_win_operators(request):
return request.param


@pytest.fixture(params=["right", "left", "both", "neither"])
def closed(request):
Copy link
Contributor

Choose a reason for hiding this comment

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

this a duplicate yes?

Copy link
Contributor

Choose a reason for hiding this comment

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

as this is generally a fixture we do want

@pytest.fixture(params=[True, False])
def center(request):
return request.param


@pytest.fixture(params=[None, 1])
def min_periods(request):
Copy link
Contributor

Choose a reason for hiding this comment

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

why are u removing this one?

Copy link
Member Author

Choose a reason for hiding this comment

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

No special reason, was only removing if unused. Adding back these window fixtures.

@@ -75,14 +65,6 @@ def nopython(request):
return request.param


@pytest.fixture(
params=[pytest.param("numba", marks=td.skip_if_no("numba", "0.46.0")), "cython"]
)
Copy link
Contributor

Choose a reason for hiding this comment

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

this is also needed

@jbrockmendel
Copy link
Member

LGTM

@WillAyd
Copy link
Member

WillAyd commented Sep 29, 2020

Does pytest expose a way to figure out what is / isn't being used?

@dsaxton
Copy link
Member Author

dsaxton commented Sep 29, 2020

Does pytest expose a way to figure out what is / isn't being used?

There's a plugin (which is what I was using here) but not sure how well-maintained it is: https://github.com/jllorencetti/pytest-deadfixtures

@jreback jreback added this to the 1.2 milestone Sep 30, 2020
@jreback jreback merged commit 4ead552 into pandas-dev:master Sep 30, 2020
@jreback
Copy link
Contributor

jreback commented Sep 30, 2020

thanks!

also as a possible issue / followup. we ideally want to surface the same / similar fixtures to the top level (and similarly push down ones that are ownly used beneath a particular sub-tree to a lower level). not sure if there is an easy way to do this.

@dsaxton dsaxton deleted the remove-unused-fixtures branch September 30, 2020 00:20
kesmit13 pushed a commit to kesmit13/pandas that referenced this pull request Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants