MCPcopy
hub / github.com/dask/dask / test_start_state_callback

Function test_start_state_callback

dask/tests/test_callbacks.py:24–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22
23
24def test_start_state_callback():
25 flag = [False]
26
27 class MyCallback(Callback):
28 def _start_state(self, dsk, state):
29 flag[0] = True
30 assert dsk["x"]() == 1
31 assert len(state["cache"]) == 1
32
33 with MyCallback():
34 get_sync({"x": 1}, "x")
35
36 assert flag[0] is True
37
38
39def test_finish_always_called():

Callers

nothing calls this directly

Calls 2

get_syncFunction · 0.90
MyCallbackClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…