diff --git a/pandas/tests/window/__init__.py b/pandas/tests/window/__init__.py new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/pandas/tests/window/conftest.py b/pandas/tests/window/conftest.py new file mode 100644 index 0000000000000..4cbf3d91d21ee --- /dev/null +++ b/pandas/tests/window/conftest.py @@ -0,0 +1,51 @@ +from typing import Any + +import pytest + + +@pytest.fixture(params=[True, False]) +def raw(request) -> bool: + return request.param + + +@pytest.fixture( + params=[ + "triang", + "blackman", + "hamming", + "bartlett", + "bohman", + "blackmanharris", + "nuttall", + "barthann", + ] +) +def win_types(request) -> str: + return request.param + + +@pytest.fixture(params=["kaiser", "gaussian", "general_gaussian", "exponential"]) +def win_types_special(request) -> str: + return request.param + + +@pytest.fixture( + params=["sum", "mean", "median", "max", "min", "var", "std", "kurt", "skew"] +) +def arithmetic_win_operators(request) -> str: + return request.param + + +@pytest.fixture(params=['right', 'left', 'both', 'neither']) +def closed(request) -> str: + return request.param + + +@pytest.fixture(params=[True, False]) +def center(request) -> bool: + return request.param + + +@pytest.fixture(params=[None, 1]) +def min_periods(request) -> Any: + return request.param diff --git a/pandas/tests/test_window.py b/pandas/tests/window/test_window.py similarity index 99% rename from pandas/tests/test_window.py rename to pandas/tests/window/test_window.py index 2df5460a05953..7efd5ae5e6058 100644 --- a/pandas/tests/test_window.py +++ b/pandas/tests/window/test_window.py @@ -30,39 +30,6 @@ def assert_equal(left, right): tm.assert_frame_equal(left, right) -@pytest.fixture(params=[True, False]) -def raw(request): - return request.param - - -@pytest.fixture( - params=[ - "triang", - "blackman", - "hamming", - "bartlett", - "bohman", - "blackmanharris", - "nuttall", - "barthann", - ] -) -def win_types(request): - return request.param - - -@pytest.fixture(params=["kaiser", "gaussian", "general_gaussian", "exponential"]) -def win_types_special(request): - return request.param - - -@pytest.fixture( - params=["sum", "mean", "median", "max", "min", "var", "std", "kurt", "skew"] -) -def arithmetic_win_operators(request): - return request.param - - class Base: _nan_locs = np.arange(20, 40)