(d, func, min_periods)
| 27 | @pytest.mark.parametrize("func", ["mean", "sum"]) |
| 28 | @pytest.mark.parametrize("min_periods", [1, 10]) |
| 29 | def test_cumulative(d, func, min_periods) -> None: |
| 30 | # One dim |
| 31 | result = getattr(d.cumulative("z", min_periods=min_periods), func)() |
| 32 | expected = getattr(d.rolling(z=d["z"].size, min_periods=min_periods), func)() |
| 33 | assert_identical(result, expected) |
| 34 | |
| 35 | # Multiple dim |
| 36 | result = getattr(d.cumulative(["z", "x"], min_periods=min_periods), func)() |
| 37 | expected = getattr( |
| 38 | d.rolling(z=d["z"].size, x=d["x"].size, min_periods=min_periods), |
| 39 | func, |
| 40 | )() |
| 41 | assert_identical(result, expected) |
| 42 | |
| 43 | |
| 44 | def test_cumulative_vs_cum(d) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…