MCPcopy
hub / github.com/pydata/xarray / raise_if_dask_computes

Function raise_if_dask_computes

xarray/tests/__init__.py:270–275  ·  view source on GitHub ↗
(max_computes=0)

Source from the content-addressed store, hash-verified

268
269
270def raise_if_dask_computes(max_computes=0):
271 # return a dummy context manager so that this can be used for non-dask objects
272 if not has_dask:
273 return nullcontext()
274 scheduler = CountingScheduler(max_computes)
275 return dask.config.set(scheduler=scheduler)
276
277
278flaky = pytest.mark.flaky

Callers 15

test_lazy_corrcovFunction · 0.90
test_polyvalFunction · 0.90
test_polyval_cftimeFunction · 0.90
test_reduceMethod · 0.90
test_groupbyMethod · 0.90
test_rollingMethod · 0.90
test_unify_chunksFunction · 0.90
test_map_blocksFunction · 0.90

Calls 1

CountingSchedulerClass · 0.85

Tested by 15

test_lazy_corrcovFunction · 0.72
test_polyvalFunction · 0.72
test_polyval_cftimeFunction · 0.72
test_reduceMethod · 0.72
test_groupbyMethod · 0.72
test_rollingMethod · 0.72
test_unify_chunksFunction · 0.72
test_map_blocksFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…