-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
CLN: Remove unused fixtures #36699
Conversation
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.
prefer to be less aggressive on these removals
most are ok - noted some
pandas/tests/window/conftest.py
Outdated
@@ -42,21 +42,11 @@ def arithmetic_win_operators(request): | |||
return request.param | |||
|
|||
|
|||
@pytest.fixture(params=["right", "left", "both", "neither"]) | |||
def closed(request): |
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.
this a duplicate yes?
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.
as this is generally a fixture we do want
pandas/tests/window/conftest.py
Outdated
@pytest.fixture(params=[True, False]) | ||
def center(request): | ||
return request.param | ||
|
||
|
||
@pytest.fixture(params=[None, 1]) | ||
def min_periods(request): |
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 are u removing this one?
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.
No special reason, was only removing if unused. Adding back these window fixtures.
pandas/tests/window/conftest.py
Outdated
@@ -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"] | |||
) |
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.
this is also needed
LGTM |
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 |
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. |
No description provided.