MCPcopy Index your code
hub / github.com/pydata/xarray / test_raise_if_dask_computes

Function test_raise_if_dask_computes

xarray/tests/test_dask.py:41–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39
40
41def test_raise_if_dask_computes():
42 data = da.from_array(np.random.default_rng(0).random((4, 6)), chunks=(2, 2))
43 with pytest.raises(RuntimeError, match=r"Too many computes"):
44 with raise_if_dask_computes():
45 data.compute()
46
47
48class DaskTestCase:

Callers

nothing calls this directly

Calls 3

raise_if_dask_computesFunction · 0.90
from_arrayMethod · 0.45
computeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…