Skip to content

TST: parametrize sparse array arithmetic tests #27271

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 13 commits into from
Jul 9, 2019
30 changes: 30 additions & 0 deletions pandas/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from datetime import date, time, timedelta, timezone
from decimal import Decimal
import operator
import os

from dateutil.tz import tzlocal, tzutc
Expand All @@ -13,6 +14,7 @@

import pandas as pd
from pandas import DataFrame
from pandas.core import ops
import pandas.util.testing as tm

hypothesis.settings.register_profile(
Expand Down Expand Up @@ -163,6 +165,34 @@ def all_arithmetic_operators(request):
return request.param


@pytest.fixture(
params=[
operator.add,
ops.radd,
operator.sub,
ops.rsub,
operator.mul,
ops.rmul,
operator.truediv,
ops.rtruediv,
operator.floordiv,
ops.rfloordiv,
operator.mod,
ops.rmod,
operator.pow,
ops.rpow,
]
)
def all_arithmetic_functions(request):
"""
Fixture for operator and roperator arithmetic functions.

Note: This includes divmod and rdivmod, whereas all_arithmetic_operators
does not.
"""
return request.param


_all_numeric_reductions = [
"sum",
"max",
Expand Down
Loading