Skip to content

REF/TST: Add more pytest idiom to resample/test_base.py #24377

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 9 commits into from
Dec 23, 2018
14 changes: 13 additions & 1 deletion pandas/tests/resample/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,22 @@ def series(index, _series_name, _static_values):


@pytest.fixture
def frame(index, _static_values):
def empty_series(series):
return series[:0]


@pytest.fixture
def frame(index, _series_name, _static_values):
# _series_name is intentionally unused
return DataFrame({'value': _static_values}, index=index)


@pytest.fixture
def empty_frame(series):
index = series.index[:0]
return DataFrame(index=index)


@pytest.fixture(params=[Series, DataFrame])
def series_and_frame(request, series, frame):
if request.param == Series:
Expand Down
Loading