MCPcopy
hub / github.com/dask/dask / test_broken_callback

Function test_broken_callback

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

Source from the content-addressed store, hash-verified

34
35
36def test_broken_callback():
37 from dask.callbacks import Callback
38
39 def _f_ok(*args, **kwargs):
40 pass
41
42 def _f_broken(*args, **kwargs):
43 raise ValueError("my_exception")
44
45 dsk = {"x": 1}
46
47 with Callback(start=_f_broken, finish=_f_ok):
48 with Callback(start=_f_ok, finish=_f_ok):
49 with pytest.raises(ValueError, match="my_exception"):
50 get(dsk, "x")
51
52
53def bad(x):

Callers

nothing calls this directly

Calls 2

CallbackClass · 0.90
getFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…