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

Function test_broken_callback

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

CallbackClass · 0.90
getFunction · 0.90

Tested by

no test coverage detected