Skip to content

Commit 4b65290

Browse files
authored
CLN: test_ewm_rolling_consistency.py (pandas-dev#37951)
1 parent 5f2bac5 commit 4b65290

File tree

5 files changed

+262
-413
lines changed

5 files changed

+262
-413
lines changed

pandas/tests/window/common.py

-147
This file was deleted.

pandas/tests/window/conftest.py

+9-29
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
@pytest.fixture(params=[True, False])
1212
def raw(request):
13+
"""raw keyword argument for rolling.apply"""
1314
return request.param
1415

1516

@@ -274,43 +275,22 @@ def consistency_data(request):
274275
return request.param
275276

276277

277-
def _create_arr():
278-
"""Internal function to mock an array."""
278+
def _create_series():
279+
"""Internal function to mock Series."""
279280
arr = np.random.randn(100)
280281
locs = np.arange(20, 40)
281282
arr[locs] = np.NaN
282-
return arr
283-
284-
285-
def _create_rng():
286-
"""Internal function to mock date range."""
287-
rng = bdate_range(datetime(2009, 1, 1), periods=100)
288-
return rng
289-
290-
291-
def _create_series():
292-
"""Internal function to mock Series."""
293-
arr = _create_arr()
294-
series = Series(arr.copy(), index=_create_rng())
283+
series = Series(arr, index=bdate_range(datetime(2009, 1, 1), periods=100))
295284
return series
296285

297286

298287
def _create_frame():
299288
"""Internal function to mock DataFrame."""
300-
rng = _create_rng()
301-
return DataFrame(np.random.randn(100, 10), index=rng, columns=np.arange(10))
302-
303-
304-
@pytest.fixture
305-
def nan_locs():
306-
"""Make a range as loc fixture."""
307-
return np.arange(20, 40)
308-
309-
310-
@pytest.fixture
311-
def arr():
312-
"""Make an array as fixture."""
313-
return _create_arr()
289+
return DataFrame(
290+
np.random.randn(100, 10),
291+
index=bdate_range(datetime(2009, 1, 1), periods=100),
292+
columns=np.arange(10),
293+
)
314294

315295

316296
@pytest.fixture

pandas/tests/window/moments/conftest.py

-19
This file was deleted.

0 commit comments

Comments
 (0)