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

Function test_rolling_raises

dask/dataframe/dask_expr/tests/test_rolling.py:184–194  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

182
183
184def test_rolling_raises():
185 df = pd.DataFrame(
186 {"a": np.random.randn(25).cumsum(), "b": np.random.randint(100, size=(25,))}
187 )
188 ddf = from_pandas(df, npartitions=2)
189
190 pytest.raises(ValueError, lambda: ddf.rolling(1.5))
191 pytest.raises(ValueError, lambda: ddf.rolling(-1))
192 pytest.raises(ValueError, lambda: ddf.rolling(3, min_periods=1.2))
193 pytest.raises(ValueError, lambda: ddf.rolling(3, min_periods=-2))
194 pytest.raises(NotImplementedError, lambda: ddf.rolling(100).mean().compute())
195
196
197def test_time_rolling_constructor(df):

Callers

nothing calls this directly

Calls 6

from_pandasFunction · 0.90
cumsumMethod · 0.45
randintMethod · 0.45
rollingMethod · 0.45
computeMethod · 0.45
meanMethod · 0.45

Tested by

no test coverage detected