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

Function test_map_overlap_errors

dask/dataframe/tests/test_rolling.py:209–228  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

207
208
209def test_map_overlap_errors():
210 # Non-integer
211 with pytest.raises(ValueError):
212 ddf.map_overlap(shifted_sum, 0.5, 3, 0, 2, c=2)
213
214 # Negative
215 with pytest.raises(ValueError):
216 ddf.map_overlap(shifted_sum, 0, -5, 0, 2, c=2)
217
218 # Partition size < window size
219 with pytest.raises(NotImplementedError):
220 ddf.map_overlap(shifted_sum, 0, 100, 0, 100, c=2).compute()
221
222 # Timedelta offset with non-datetime
223 with pytest.raises(TypeError):
224 ddf.map_overlap(shifted_sum, pd.Timedelta("1s"), pd.Timedelta("1s"), 0, 2, c=2)
225
226 # String timedelta offset with non-datetime
227 with pytest.raises(TypeError):
228 ddf.map_overlap(shifted_sum, "1s", "1s", 0, 2, c=2)
229
230
231def test_map_overlap_provide_meta():

Callers

nothing calls this directly

Calls 2

map_overlapMethod · 0.45
computeMethod · 0.45

Tested by

no test coverage detected