MCPcopy Index your code
hub / github.com/dask/dask / test_with_cache

Function test_with_cache

dask/diagnostics/tests/test_progress.py:99–115  ·  view source on GitHub ↗
(capsys)

Source from the content-addressed store, hash-verified

97
98
99def test_with_cache(capsys):
100 cachey = pytest.importorskip("cachey")
101 from dask.cache import Cache
102
103 c = cachey.Cache(10000)
104 cc = Cache(c)
105
106 with cc:
107 with ProgressBar():
108 assert get_threaded({"x": (mul, 1, 2)}, "x") == 2
109 check_bar_completed(capsys)
110 assert c.data["x"] == 2
111
112 with cc:
113 with ProgressBar():
114 assert get_threaded({"x": (mul, 1, 2), "y": (mul, "x", 3)}, "y") == 6
115 check_bar_completed(capsys)
116
117
118def test_with_alias(capsys):

Callers

nothing calls this directly

Calls 3

CacheClass · 0.90
ProgressBarClass · 0.90
check_bar_completedFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…