From f457aed579c04506dfee433d581c29d489f3a156 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Fri, 29 Oct 2021 20:49:44 -0700 Subject: [PATCH 1/5] Simplify and thin out consistency rolling tests --- pandas/tests/window/moments/conftest.py | 6 + .../test_moments_consistency_rolling.py | 108 +++++------------- 2 files changed, 35 insertions(+), 79 deletions(-) diff --git a/pandas/tests/window/moments/conftest.py b/pandas/tests/window/moments/conftest.py index e843caa48f6d7..c6935a238975e 100644 --- a/pandas/tests/window/moments/conftest.py +++ b/pandas/tests/window/moments/conftest.py @@ -158,3 +158,9 @@ def no_nans(x): def consistency_data(request): """Create consistency data""" return request.param + + +@pytest.fixture(params=[(1, 1), (2, 0), (10, 4), (20, 2)]) +def rolling_consistency_cases(request): + """window, min_periods""" + return request.param diff --git a/pandas/tests/window/moments/test_moments_consistency_rolling.py b/pandas/tests/window/moments/test_moments_consistency_rolling.py index bda8ba05d4024..49bc5af4e9d69 100644 --- a/pandas/tests/window/moments/test_moments_consistency_rolling.py +++ b/pandas/tests/window/moments/test_moments_consistency_rolling.py @@ -5,26 +5,17 @@ import pandas._testing as tm -def _rolling_consistency_cases(): - for window in [1, 2, 3, 10, 20]: - for min_periods in {0, 1, 2, 3, 4, window}: - if min_periods and (min_periods > window): - continue - for center in [False, True]: - yield window, min_periods, center - - -@pytest.mark.parametrize( - "window,min_periods,center", list(_rolling_consistency_cases()) -) -@pytest.mark.parametrize("f", [lambda v: Series(v).sum(), np.nansum]) -def test_rolling_apply_consistency_sum_nans( - consistency_data, window, min_periods, center, f +@pytest.mark.parametrize("f", [lambda v: Series(v).sum(), np.nansum, np.sum]) +def test_rolling_apply_consistency_sum( + consistency_data, rolling_consistency_cases, center, f ): x, is_constant, no_nans = consistency_data + window, min_periods = rolling_consistency_cases if f is np.nansum and min_periods == 0: pass + elif f is np.sum and not no_nans: + pass else: rolling_f_result = x.rolling( window=window, min_periods=min_periods, center=center @@ -35,36 +26,13 @@ def test_rolling_apply_consistency_sum_nans( tm.assert_equal(rolling_f_result, rolling_apply_f_result) -@pytest.mark.parametrize( - "window,min_periods,center", list(_rolling_consistency_cases()) -) -@pytest.mark.parametrize("f", [lambda v: Series(v).sum(), np.nansum, np.sum]) -def test_rolling_apply_consistency_sum_no_nans( - consistency_data, window, min_periods, center, f -): - x, is_constant, no_nans = consistency_data - - if no_nans: - if f is np.nansum and min_periods == 0: - pass - else: - rolling_f_result = x.rolling( - window=window, min_periods=min_periods, center=center - ).sum() - rolling_apply_f_result = x.rolling( - window=window, min_periods=min_periods, center=center - ).apply(func=f, raw=True) - tm.assert_equal(rolling_f_result, rolling_apply_f_result) - - -@pytest.mark.parametrize( - "window,min_periods,center", list(_rolling_consistency_cases()) -) @pytest.mark.parametrize("ddof", [0, 1]) -def test_moments_consistency_var(consistency_data, window, min_periods, center, ddof): +def test_moments_consistency_var( + consistency_data, rolling_consistency_cases, center, ddof +): x, is_constant, no_nans = consistency_data + window, min_periods = rolling_consistency_cases - mean_x = x.rolling(window=window, min_periods=min_periods, center=center).mean() var_x = x.rolling(window=window, min_periods=min_periods, center=center).var( ddof=ddof ) @@ -72,6 +40,7 @@ def test_moments_consistency_var(consistency_data, window, min_periods, center, if ddof == 0: # check that biased var(x) == mean(x^2) - mean(x)^2 + mean_x = x.rolling(window=window, min_periods=min_periods, center=center).mean() mean_x2 = ( (x * x) .rolling(window=window, min_periods=min_periods, center=center) @@ -80,14 +49,12 @@ def test_moments_consistency_var(consistency_data, window, min_periods, center, tm.assert_equal(var_x, mean_x2 - (mean_x * mean_x)) -@pytest.mark.parametrize( - "window,min_periods,center", list(_rolling_consistency_cases()) -) @pytest.mark.parametrize("ddof", [0, 1]) def test_moments_consistency_var_constant( - consistency_data, window, min_periods, center, ddof + consistency_data, rolling_consistency_cases, center, ddof ): x, is_constant, no_nans = consistency_data + window, min_periods = rolling_consistency_cases if is_constant: count_x = x.rolling( @@ -106,37 +73,26 @@ def test_moments_consistency_var_constant( tm.assert_equal(var_x, expected) -@pytest.mark.parametrize( - "window,min_periods,center", list(_rolling_consistency_cases()) -) @pytest.mark.parametrize("ddof", [0, 1]) -def test_rolling_consistency_std(consistency_data, window, min_periods, center, ddof): +def test_rolling_consistency_var_std_cov( + consistency_data, rolling_consistency_cases, center, ddof +): x, is_constant, no_nans = consistency_data + window, min_periods = rolling_consistency_cases var_x = x.rolling(window=window, min_periods=min_periods, center=center).var( ddof=ddof ) + assert not (var_x < 0).any().any() + std_x = x.rolling(window=window, min_periods=min_periods, center=center).std( ddof=ddof ) - assert not (var_x < 0).any().any() assert not (std_x < 0).any().any() # check that var(x) == std(x)^2 tm.assert_equal(var_x, std_x * std_x) - -@pytest.mark.parametrize( - "window,min_periods,center", list(_rolling_consistency_cases()) -) -@pytest.mark.parametrize("ddof", [0, 1]) -def test_rolling_consistency_cov(consistency_data, window, min_periods, center, ddof): - x, is_constant, no_nans = consistency_data - var_x = x.rolling(window=window, min_periods=min_periods, center=center).var( - ddof=ddof - ) - assert not (var_x < 0).any().any() - cov_x_x = x.rolling(window=window, min_periods=min_periods, center=center).cov( x, ddof=ddof ) @@ -146,14 +102,12 @@ def test_rolling_consistency_cov(consistency_data, window, min_periods, center, tm.assert_equal(var_x, cov_x_x) -@pytest.mark.parametrize( - "window,min_periods,center", list(_rolling_consistency_cases()) -) @pytest.mark.parametrize("ddof", [0, 1]) def test_rolling_consistency_series_cov_corr( - consistency_data, window, min_periods, center, ddof + consistency_data, rolling_consistency_cases, center, ddof ): x, is_constant, no_nans = consistency_data + window, min_periods = rolling_consistency_cases if isinstance(x, Series): var_x_plus_y = ( @@ -204,11 +158,9 @@ def test_rolling_consistency_series_cov_corr( tm.assert_equal(cov_x_y, mean_x_times_y - (mean_x * mean_y)) -@pytest.mark.parametrize( - "window,min_periods,center", list(_rolling_consistency_cases()) -) -def test_rolling_consistency_mean(consistency_data, window, min_periods, center): +def test_rolling_consistency_mean(consistency_data, rolling_consistency_cases, center): x, is_constant, no_nans = consistency_data + window, min_periods = rolling_consistency_cases result = x.rolling(window=window, min_periods=min_periods, center=center).mean() expected = ( @@ -221,11 +173,11 @@ def test_rolling_consistency_mean(consistency_data, window, min_periods, center) tm.assert_equal(result, expected.astype("float64")) -@pytest.mark.parametrize( - "window,min_periods,center", list(_rolling_consistency_cases()) -) -def test_rolling_consistency_constant(consistency_data, window, min_periods, center): +def test_rolling_consistency_constant( + consistency_data, rolling_consistency_cases, center +): x, is_constant, no_nans = consistency_data + window, min_periods = rolling_consistency_cases if is_constant: count_x = x.rolling( @@ -249,13 +201,11 @@ def test_rolling_consistency_constant(consistency_data, window, min_periods, cen tm.assert_equal(corr_x_x, expected) -@pytest.mark.parametrize( - "window,min_periods,center", list(_rolling_consistency_cases()) -) def test_rolling_consistency_var_debiasing_factors( - consistency_data, window, min_periods, center + consistency_data, rolling_consistency_cases, center ): x, is_constant, no_nans = consistency_data + window, min_periods = rolling_consistency_cases # check variance debiasing factors var_unbiased_x = x.rolling( From bc163640da5bc895f8d68d2c78654b1a6501af53 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Fri, 29 Oct 2021 21:22:49 -0700 Subject: [PATCH 2/5] Simplify and thin out consistency expanding tests --- pandas/tests/window/moments/conftest.py | 5 +++ .../test_moments_consistency_expanding.py | 44 +++---------------- 2 files changed, 12 insertions(+), 37 deletions(-) diff --git a/pandas/tests/window/moments/conftest.py b/pandas/tests/window/moments/conftest.py index c6935a238975e..1958d287711a6 100644 --- a/pandas/tests/window/moments/conftest.py +++ b/pandas/tests/window/moments/conftest.py @@ -164,3 +164,8 @@ def consistency_data(request): def rolling_consistency_cases(request): """window, min_periods""" return request.param + + +@pytest.fixture(params=[0, 4]) +def min_periods(request): + return request.param diff --git a/pandas/tests/window/moments/test_moments_consistency_expanding.py b/pandas/tests/window/moments/test_moments_consistency_expanding.py index d0fe7bf9fc2d2..14314f80f152c 100644 --- a/pandas/tests/window/moments/test_moments_consistency_expanding.py +++ b/pandas/tests/window/moments/test_moments_consistency_expanding.py @@ -5,13 +5,14 @@ import pandas._testing as tm -@pytest.mark.parametrize("min_periods", [0, 1, 2, 3, 4]) -@pytest.mark.parametrize("f", [lambda v: Series(v).sum(), np.nansum]) +@pytest.mark.parametrize("f", [lambda v: Series(v).sum(), np.nansum, np.sum]) def test_expanding_apply_consistency_sum_nans(consistency_data, min_periods, f): x, is_constant, no_nans = consistency_data if f is np.nansum and min_periods == 0: pass + elif f is np.sum and not no_nans: + pass else: expanding_f_result = x.expanding(min_periods=min_periods).sum() expanding_apply_f_result = x.expanding(min_periods=min_periods).apply( @@ -20,39 +21,20 @@ def test_expanding_apply_consistency_sum_nans(consistency_data, min_periods, f): tm.assert_equal(expanding_f_result, expanding_apply_f_result) -@pytest.mark.parametrize("min_periods", [0, 1, 2, 3, 4]) -@pytest.mark.parametrize("f", [lambda v: Series(v).sum(), np.nansum, np.sum]) -def test_expanding_apply_consistency_sum_no_nans(consistency_data, min_periods, f): - - x, is_constant, no_nans = consistency_data - - if no_nans: - if f is np.nansum and min_periods == 0: - pass - else: - expanding_f_result = x.expanding(min_periods=min_periods).sum() - expanding_apply_f_result = x.expanding(min_periods=min_periods).apply( - func=f, raw=True - ) - tm.assert_equal(expanding_f_result, expanding_apply_f_result) - - -@pytest.mark.parametrize("min_periods", [0, 1, 2, 3, 4]) @pytest.mark.parametrize("ddof", [0, 1]) def test_moments_consistency_var(consistency_data, min_periods, ddof): x, is_constant, no_nans = consistency_data - mean_x = x.expanding(min_periods=min_periods).mean() var_x = x.expanding(min_periods=min_periods).var(ddof=ddof) assert not (var_x < 0).any().any() if ddof == 0: # check that biased var(x) == mean(x^2) - mean(x)^2 mean_x2 = (x * x).expanding(min_periods=min_periods).mean() + mean_x = x.expanding(min_periods=min_periods).mean() tm.assert_equal(var_x, mean_x2 - (mean_x * mean_x)) -@pytest.mark.parametrize("min_periods", [0, 1, 2, 3, 4]) @pytest.mark.parametrize("ddof", [0, 1]) def test_moments_consistency_var_constant(consistency_data, min_periods, ddof): x, is_constant, no_nans = consistency_data @@ -70,27 +52,19 @@ def test_moments_consistency_var_constant(consistency_data, min_periods, ddof): tm.assert_equal(var_x, expected) -@pytest.mark.parametrize("min_periods", [0, 1, 2, 3, 4]) @pytest.mark.parametrize("ddof", [0, 1]) -def test_expanding_consistency_std(consistency_data, min_periods, ddof): +def test_expanding_consistency_var_std_cov(consistency_data, min_periods, ddof): x, is_constant, no_nans = consistency_data var_x = x.expanding(min_periods=min_periods).var(ddof=ddof) - std_x = x.expanding(min_periods=min_periods).std(ddof=ddof) assert not (var_x < 0).any().any() + + std_x = x.expanding(min_periods=min_periods).std(ddof=ddof) assert not (std_x < 0).any().any() # check that var(x) == std(x)^2 tm.assert_equal(var_x, std_x * std_x) - -@pytest.mark.parametrize("min_periods", [0, 1, 2, 3, 4]) -@pytest.mark.parametrize("ddof", [0, 1]) -def test_expanding_consistency_cov(consistency_data, min_periods, ddof): - x, is_constant, no_nans = consistency_data - var_x = x.expanding(min_periods=min_periods).var(ddof=ddof) - assert not (var_x < 0).any().any() - cov_x_x = x.expanding(min_periods=min_periods).cov(x, ddof=ddof) assert not (cov_x_x < 0).any().any() @@ -98,7 +72,6 @@ def test_expanding_consistency_cov(consistency_data, min_periods, ddof): tm.assert_equal(var_x, cov_x_x) -@pytest.mark.parametrize("min_periods", [0, 1, 2, 3, 4]) @pytest.mark.parametrize("ddof", [0, 1]) def test_expanding_consistency_series_cov_corr(consistency_data, min_periods, ddof): x, is_constant, no_nans = consistency_data @@ -128,7 +101,6 @@ def test_expanding_consistency_series_cov_corr(consistency_data, min_periods, dd tm.assert_equal(cov_x_y, mean_x_times_y - (mean_x * mean_y)) -@pytest.mark.parametrize("min_periods", [0, 1, 2, 3, 4]) def test_expanding_consistency_mean(consistency_data, min_periods): x, is_constant, no_nans = consistency_data @@ -140,7 +112,6 @@ def test_expanding_consistency_mean(consistency_data, min_periods): tm.assert_equal(result, expected.astype("float64")) -@pytest.mark.parametrize("min_periods", [0, 1, 2, 3, 4]) def test_expanding_consistency_constant(consistency_data, min_periods): x, is_constant, no_nans = consistency_data @@ -162,7 +133,6 @@ def test_expanding_consistency_constant(consistency_data, min_periods): tm.assert_equal(corr_x_x, expected) -@pytest.mark.parametrize("min_periods", [0, 1, 2, 3, 4]) def test_expanding_consistency_var_debiasing_factors(consistency_data, min_periods): x, is_constant, no_nans = consistency_data From 8c3f7bca57c38600aaeb9753cfe9090ad502fe30 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Fri, 29 Oct 2021 21:47:47 -0700 Subject: [PATCH 3/5] Simplify and thin out consistency ewm tests --- .../moments/test_moments_consistency_ewm.py | 23 +++---------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/pandas/tests/window/moments/test_moments_consistency_ewm.py b/pandas/tests/window/moments/test_moments_consistency_ewm.py index 800ee2164693b..8feec32ba99c5 100644 --- a/pandas/tests/window/moments/test_moments_consistency_ewm.py +++ b/pandas/tests/window/moments/test_moments_consistency_ewm.py @@ -18,7 +18,7 @@ def create_mock_weights(obj, com, adjust, ignore_na): create_mock_series_weights( obj.iloc[:, i], com=com, adjust=adjust, ignore_na=ignore_na ) - for i, _ in enumerate(obj.columns) + for i in range(len(obj.columns)) ], axis=1, ) @@ -58,7 +58,6 @@ def create_mock_series_weights(s, com, adjust, ignore_na): return w -@pytest.mark.parametrize("min_periods", [0, 1, 2, 3, 4]) def test_ewm_consistency_mean(consistency_data, adjust, ignore_na, min_periods): x, is_constant, no_nans = consistency_data com = 3.0 @@ -76,7 +75,6 @@ def test_ewm_consistency_mean(consistency_data, adjust, ignore_na, min_periods): tm.assert_equal(result, expected.astype("float64")) -@pytest.mark.parametrize("min_periods", [0, 1, 2, 3, 4]) def test_ewm_consistency_consistent(consistency_data, adjust, ignore_na, min_periods): x, is_constant, no_nans = consistency_data com = 3.0 @@ -102,7 +100,6 @@ def test_ewm_consistency_consistent(consistency_data, adjust, ignore_na, min_per tm.assert_equal(corr_x_x, expected) -@pytest.mark.parametrize("min_periods", [0, 1, 2, 3, 4]) def test_ewm_consistency_var_debiasing_factors( consistency_data, adjust, ignore_na, min_periods ): @@ -128,7 +125,6 @@ def test_ewm_consistency_var_debiasing_factors( tm.assert_equal(var_unbiased_x, var_biased_x * var_debiasing_factors_x) -@pytest.mark.parametrize("min_periods", [0, 1, 2, 3, 4]) @pytest.mark.parametrize("bias", [True, False]) def test_moments_consistency_var( consistency_data, adjust, ignore_na, min_periods, bias @@ -154,7 +150,6 @@ def test_moments_consistency_var( tm.assert_equal(var_x, mean_x2 - (mean_x * mean_x)) -@pytest.mark.parametrize("min_periods", [0, 1, 2, 3, 4]) @pytest.mark.parametrize("bias", [True, False]) def test_moments_consistency_var_constant( consistency_data, adjust, ignore_na, min_periods, bias @@ -176,7 +171,6 @@ def test_moments_consistency_var_constant( tm.assert_equal(var_x, expected) -@pytest.mark.parametrize("min_periods", [0, 1, 2, 3, 4]) @pytest.mark.parametrize("bias", [True, False]) def test_ewm_consistency_std(consistency_data, adjust, ignore_na, min_periods, bias): x, is_constant, no_nans = consistency_data @@ -184,26 +178,16 @@ def test_ewm_consistency_std(consistency_data, adjust, ignore_na, min_periods, b var_x = x.ewm( com=com, min_periods=min_periods, adjust=adjust, ignore_na=ignore_na ).var(bias=bias) + assert not (var_x < 0).any().any() + std_x = x.ewm( com=com, min_periods=min_periods, adjust=adjust, ignore_na=ignore_na ).std(bias=bias) - assert not (var_x < 0).any().any() assert not (std_x < 0).any().any() # check that var(x) == std(x)^2 tm.assert_equal(var_x, std_x * std_x) - -@pytest.mark.parametrize("min_periods", [0, 1, 2, 3, 4]) -@pytest.mark.parametrize("bias", [True, False]) -def test_ewm_consistency_cov(consistency_data, adjust, ignore_na, min_periods, bias): - x, is_constant, no_nans = consistency_data - com = 3.0 - var_x = x.ewm( - com=com, min_periods=min_periods, adjust=adjust, ignore_na=ignore_na - ).var(bias=bias) - assert not (var_x < 0).any().any() - cov_x_x = x.ewm( com=com, min_periods=min_periods, adjust=adjust, ignore_na=ignore_na ).cov(x, bias=bias) @@ -213,7 +197,6 @@ def test_ewm_consistency_cov(consistency_data, adjust, ignore_na, min_periods, b tm.assert_equal(var_x, cov_x_x) -@pytest.mark.parametrize("min_periods", [0, 1, 2, 3, 4]) @pytest.mark.parametrize("bias", [True, False]) def test_ewm_consistency_series_cov_corr( consistency_data, adjust, ignore_na, min_periods, bias From c756b7d4072802404dd2cf5b044878c19c8925cb Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Fri, 29 Oct 2021 23:34:53 -0700 Subject: [PATCH 4/5] Narrow down cases for window/moments --- pandas/tests/window/moments/conftest.py | 157 +++++------------------- 1 file changed, 28 insertions(+), 129 deletions(-) diff --git a/pandas/tests/window/moments/conftest.py b/pandas/tests/window/moments/conftest.py index 1958d287711a6..b192f72c8f08b 100644 --- a/pandas/tests/window/moments/conftest.py +++ b/pandas/tests/window/moments/conftest.py @@ -1,3 +1,5 @@ +import itertools + import numpy as np import pytest @@ -12,133 +14,20 @@ def _create_consistency_data(): def create_series(): return [ - Series(dtype=object), - Series([np.nan]), - Series([np.nan, np.nan]), - Series([3.0]), - Series([np.nan, 3.0]), - Series([3.0, np.nan]), - Series([1.0, 3.0]), - Series([2.0, 2.0]), - Series([3.0, 1.0]), - Series( - [5.0, 5.0, 5.0, 5.0, np.nan, np.nan, np.nan, 5.0, 5.0, np.nan, np.nan] - ), - Series( - [ - np.nan, - 5.0, - 5.0, - 5.0, - np.nan, - np.nan, - np.nan, - 5.0, - 5.0, - np.nan, - np.nan, - ] - ), - Series( - [ - np.nan, - np.nan, - 5.0, - 5.0, - np.nan, - np.nan, - np.nan, - 5.0, - 5.0, - np.nan, - np.nan, - ] - ), - Series( - [ - np.nan, - 3.0, - np.nan, - 3.0, - 4.0, - 5.0, - 6.0, - np.nan, - np.nan, - 7.0, - 12.0, - 13.0, - 14.0, - 15.0, - ] - ), - Series( - [ - np.nan, - 5.0, - np.nan, - 2.0, - 4.0, - 0.0, - 9.0, - np.nan, - np.nan, - 3.0, - 12.0, - 13.0, - 14.0, - 15.0, - ] - ), - Series( - [ - 2.0, - 3.0, - np.nan, - 3.0, - 4.0, - 5.0, - 6.0, - np.nan, - np.nan, - 7.0, - 12.0, - 13.0, - 14.0, - 15.0, - ] - ), - Series( - [ - 2.0, - 5.0, - np.nan, - 2.0, - 4.0, - 0.0, - 9.0, - np.nan, - np.nan, - 3.0, - 12.0, - 13.0, - 14.0, - 15.0, - ] - ), - Series(range(10)), - Series(range(20, 0, -2)), + Series(dtype=np.float64, name="a"), + Series([np.nan] * 5), + Series([1.0] * 5), + Series(range(5, 0, -1)), + Series(range(5)), + Series([np.nan, 1.0, np.nan, 1.0, 1.0]), + Series([np.nan, 1.0, np.nan, 2.0, 3.0]), + Series([np.nan, 1.0, np.nan, 3.0, 2.0]), ] def create_dataframes(): return [ - DataFrame(), - DataFrame(columns=["a"]), DataFrame(columns=["a", "a"]), - DataFrame(columns=["a", "b"]), - DataFrame(np.arange(10).reshape((5, 2))), - DataFrame(np.arange(25).reshape((5, 5))), - DataFrame(np.arange(25).reshape((5, 5)), columns=["a", "b", 99, "d", "d"]), + DataFrame(np.arange(15).reshape((5, 3)), columns=["a", "a", 99]), ] + [DataFrame(s) for s in create_series()] def is_constant(x): @@ -148,24 +37,34 @@ def is_constant(x): def no_nans(x): return x.notna().all().all() - # data is a tuple(object, is_constant, no_nans) - data = create_series() + create_dataframes() - - return [(x, is_constant(x), no_nans(x)) for x in data] + return [ + (x, is_constant(x), no_nans(x)) + for x in itertools.chain(create_dataframes(), create_dataframes()) + ] @pytest.fixture(params=_create_consistency_data()) def consistency_data(request): - """Create consistency data""" + """ + Test: + - Empty Series / DataFrame + - All NaN + - All consistent value + - Monotonically decreasing + - Monotonically increasing + - Monotonically consistent with NaNs + - Monotonically increasing with NaNs + - Monotonically decreasing with NaNs + """ return request.param -@pytest.fixture(params=[(1, 1), (2, 0), (10, 4), (20, 2)]) +@pytest.fixture(params=[(1, 0), (5, 1)]) def rolling_consistency_cases(request): """window, min_periods""" return request.param -@pytest.fixture(params=[0, 4]) +@pytest.fixture(params=[0, 2]) def min_periods(request): return request.param From 03f7785ade9e6da7ba1c593ed22f401da388fb96 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Fri, 29 Oct 2021 23:37:05 -0700 Subject: [PATCH 5/5] Test removing window/moments tests on windows --- ci/run_tests.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ci/run_tests.sh b/ci/run_tests.sh index 53a2bf151d3bf..9fea696b6ea81 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -22,9 +22,7 @@ fi PYTEST_CMD="${XVFB}pytest -m \"$PATTERN\" -n $PYTEST_WORKERS --dist=loadfile $TEST_ARGS $COVERAGE $PYTEST_TARGET" if [[ $(uname) != "Linux" && $(uname) != "Darwin" ]]; then - # GH#37455 windows py38 build appears to be running out of memory - # skip collection of window tests - PYTEST_CMD="$PYTEST_CMD --ignore=pandas/tests/window/moments --ignore=pandas/tests/plotting/" + PYTEST_CMD="$PYTEST_CMD --ignore=pandas/tests/plotting/" fi echo $PYTEST_CMD