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

Function custom_scheduler_get

dask/array/tests/test_xarray.py:96–101  ·  view source on GitHub ↗
(dsk, keys, expected, **kwargs)

Source from the content-addressed store, hash-verified

94 pytest.importorskip("zarr")
95
96 def custom_scheduler_get(dsk, keys, expected, **kwargs):
97 dsk = dsk.__dask_graph__()
98 assert (
99 len(dsk) == expected
100 ), f"False number of tasks got {len(dsk)} but expected {expected}"
101 return [42 for _ in keys]
102
103 # First test that this mocking stuff works as expecged
104 with pytest.raises(AssertionError, match="False number of tasks"):

Callers

nothing calls this directly

Calls 1

__dask_graph__Method · 0.45

Tested by

no test coverage detected