Skip to content
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

TST: Use new arithmetic fixtures, parametrize many more tests #23757

Merged
merged 21 commits into from
Nov 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
34 changes: 4 additions & 30 deletions pandas/tests/arithmetic/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
import pandas as pd

from pandas.compat import long
from pandas.core.arrays import (
PeriodArray, DatetimeArrayMixin as DatetimeArray,
TimedeltaArrayMixin as TimedeltaArray)
import pandas.util.testing as tm


Expand Down Expand Up @@ -189,33 +186,6 @@ def box_transpose_fail(request):
return request.param


@pytest.fixture(params=[pd.Index, pd.Series, pd.DataFrame, PeriodArray],
ids=id_func)
def box_with_period(request):
"""
Like `box`, but specific to PeriodDtype for also testing PeriodArray
"""
return request.param


@pytest.fixture(params=[pd.Index, pd.Series, pd.DataFrame, DatetimeArray],
ids=id_func)
def box_with_datetime(request):
"""
Like `box`, but specific to datetime64 for also testing DatetimeArray
"""
return request.param


@pytest.fixture(params=[pd.Index, pd.Series, pd.DataFrame, TimedeltaArray],
ids=id_func)
def box_with_timedelta(request):
"""
Like `box`, but specific to timedelta64 for also testing TimedeltaArray
"""
return request.param


@pytest.fixture(params=[pd.Index, pd.Series, pd.DataFrame, tm.to_array],
ids=id_func)
def box_with_array(request):
Expand All @@ -224,3 +194,7 @@ def box_with_array(request):
classes
"""
return request.param


# alias so we can use the same fixture for multiple parameters in a test
box_with_array2 = box_with_array
Loading