ai-content-maker/.venv/Lib/site-packages/pandas/tests/tseries/offsets/conftest.py

32 lines
698 B
Python
Raw Permalink Normal View History

2024-05-03 04:18:51 +03:00
import pytest
from pandas._libs.tslibs.offsets import MonthOffset
import pandas.tseries.offsets as offsets
@pytest.fixture(
params=[
getattr(offsets, o) for o in offsets.__all__ if o not in ("Tick", "BaseOffset")
]
)
def offset_types(request):
"""
Fixture for all the datetime offsets available for a time series.
"""
return request.param
@pytest.fixture(
params=[
getattr(offsets, o)
for o in offsets.__all__
if issubclass(getattr(offsets, o), MonthOffset) and o != "MonthOffset"
]
)
def month_classes(request):
"""
Fixture for month based datetime offsets available for a time series.
"""
return request.param