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

Function test_cache_correctness

dask/tests/test_cache.py:55–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53
54
55def test_cache_correctness():
56 # https://github.com/dask/dask/issues/3631
57 c = Cache(10000)
58 pytest.importorskip("numpy")
59 da = pytest.importorskip("dask.array")
60 from numpy import ones, zeros
61
62 z = da.from_array(zeros(1), chunks=10)
63 o = da.from_array(ones(1), chunks=10)
64 with c:
65 assert (z.compute() == 0).all()
66 assert (o.compute() == 1).all()
67
68
69def f(duration, size, *args):

Callers

nothing calls this directly

Calls 3

CacheClass · 0.90
allMethod · 0.45
computeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…