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

Function test_callback

dask/tests/test_local.py:118–134  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

116
117
118def test_callback():
119 f = lambda x: x + 1
120 dsk = {"a": (f, 1)}
121 from dask.threaded import get
122
123 def start_callback(key, d, state):
124 assert key == "a" or key is None
125 assert d == dsk
126 assert isinstance(state, dict)
127
128 def end_callback(key, value, d, state, worker_id):
129 assert key == "a" or key is None
130 assert value == 2 or value is None
131 assert d == dsk
132 assert isinstance(state, dict)
133
134 get(dsk, "a", start_callback=start_callback, end_callback=end_callback)
135
136
137def test_exceptions_propagate():

Callers

nothing calls this directly

Calls 1

getFunction · 0.90

Tested by

no test coverage detected