Skip to content

TST: Use sort fixture in more places #32292

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
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
moved sort fixture to pandas/tests/indexes/conftest.py
  • Loading branch information
SaturnFromTitan committed Feb 27, 2020
commit 0fd9b611003208e6980d165c9d59a2968083c029
8 changes: 0 additions & 8 deletions pandas/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,6 @@ def ordered_fixture(request):
return request.param


@pytest.fixture(params=[None, False])
def sort(request):
"""
Valid values for 'sort' parameter used in a variety of methods
"""
return request.param


_all_arithmetic_operators = [
"__add__",
"__radd__",
Expand Down
16 changes: 16 additions & 0 deletions pandas/tests/indexes/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import pytest


@pytest.fixture(params=[None, False])
def sort(request):
"""
Valid values for 'sort' parameter used in a variety Index methods.

Caution:
There are also "sort" fixtures with params [True, False] or [None, True, False].
For instance these might be used for DataFrame.groupby.

We can't extend the params here either as sort=True is not permitted in
many Index methods.
"""
return request.param