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
Show file tree
Hide file tree
Changes from all commits
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
17 changes: 0 additions & 17 deletions pandas/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,6 @@ def axis(request):
axis_frame = axis


@pytest.fixture(params=[0, "index"], ids=lambda x: f"axis {repr(x)}")
def axis_series(request):
"""
Fixture for returning the axis numbers of a Series.
"""
return request.param


@pytest.fixture(params=[True, False, None])
def observed(request):
"""
Expand Down Expand Up @@ -1239,15 +1231,6 @@ def spmatrix(request):
return getattr(sparse, request.param + "_matrix")


@pytest.fixture(params=list(tm.cython_table))
def cython_table_items(request):
"""
Yields a tuple of a function and its corresponding name. Correspond to
the list of aggregator "Cython functions" used on selected table items.
"""
return request.param


@pytest.fixture(
params=[
getattr(pd.offsets, o)
Expand Down
8 changes: 0 additions & 8 deletions pandas/tests/arrays/boolean/test_construction.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@
from pandas.core.arrays.boolean import coerce_to_array


@pytest.fixture
def data():
return pd.array(
[True, False] * 4 + [np.nan] + [True, False] * 44 + [np.nan] + [True, False],
dtype="boolean",
)


def test_boolean_array_constructor():
values = np.array([True, False, True, False], dtype="bool")
mask = np.array([False, False, False, True], dtype="bool")
Expand Down
8 changes: 0 additions & 8 deletions pandas/tests/arrays/boolean/test_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@
import pandas._testing as tm


@pytest.fixture
def data():
return pd.array(
[True, False] * 4 + [np.nan] + [True, False] * 44 + [np.nan] + [True, False],
dtype="boolean",
)


@pytest.mark.parametrize(
"ufunc", [np.add, np.logical_or, np.logical_and, np.logical_xor]
)
Expand Down
5 changes: 0 additions & 5 deletions pandas/tests/arrays/sparse/test_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@
from pandas.core.arrays.sparse import SparseArray, SparseDtype


@pytest.fixture(params=["integer", "block"])
def kind(request):
return request.param


class TestSparseArray:
def setup_method(self, method):
self.arr_data = np.array([np.nan, np.nan, 1, 2, 3, np.nan, 4, 5, np.nan, 6])
Expand Down
5 changes: 0 additions & 5 deletions pandas/tests/indexes/interval/test_setops.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
import pandas._testing as tm


@pytest.fixture(scope="class", params=[None, "foo"])
def name(request):
return request.param


def monotonic_index(start, end, dtype="int64", closed="right"):
return IntervalIndex.from_breaks(np.arange(start, end, dtype=dtype), closed=closed)

Expand Down
6 changes: 0 additions & 6 deletions pandas/tests/resample/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ def downsample_method(request):
return request.param


@pytest.fixture(params=upsample_methods)
def upsample_method(request):
"""Fixture for parametrization of Grouper upsample methods."""
return request.param


@pytest.fixture(params=resample_methods)
def resample_method(request):
"""Fixture for parametrization of Grouper resample methods."""
Expand Down