MCPcopy Create free account
hub / github.com/dask/dask / test_time_rolling

Function test_time_rolling

dask/dataframe/tests/test_rolling.py:428–440  ·  view source on GitHub ↗
(before, after)

Source from the content-addressed store, hash-verified

426
427@pytest.mark.parametrize("before, after", [("6s", "6s"), ("2s", "2s"), ("6s", "2s")])
428def test_time_rolling(before, after):
429 window = before
430 expected = dts.compute().rolling(window).count()
431
432 # String timedelta
433 result = dts.map_overlap(lambda x: x.rolling(window).count(), before, after)
434 assert_eq(result, expected)
435
436 # Timedelta
437 before = pd.Timedelta(before)
438 after = pd.Timedelta(after)
439 result = dts.map_overlap(lambda x: x.rolling(window).count(), before, after)
440 assert_eq(result, expected)
441
442
443def test_rolling_agg_aggregate():

Callers

nothing calls this directly

Calls 5

assert_eqFunction · 0.90
countMethod · 0.45
rollingMethod · 0.45
computeMethod · 0.45
map_overlapMethod · 0.45

Tested by

no test coverage detected