MCPcopy
hub / github.com/dask/dask / test_cache_profiler_plot

Function test_cache_profiler_plot

dask/diagnostics/tests/test_profiler.py:267–292  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

265
266@pytest.mark.skipif("not bokeh")
267def test_cache_profiler_plot():
268 with CacheProfiler(metric_name="non-standard") as cprof:
269 get(dsk, "e")
270 p = cprof.visualize(
271 width=500,
272 height=300,
273 tools="hover",
274 title="Not the default",
275 show=False,
276 save=False,
277 )
278 if BOKEH_VERSION().major < 3:
279 assert p.plot_width == 500
280 assert p.plot_height == 300
281 else:
282 assert p.width == 500
283 assert p.height == 300
284 assert len(p.tools) == 1
285 assert isinstance(p.tools[0], bokeh.models.HoverTool)
286 assert p.title.text == "Not the default"
287 assert p.axis[1].axis_label == "Cache Size (non-standard)"
288 # Test empty, checking for errors
289 cprof.clear()
290 with warnings.catch_warnings(record=True) as record:
291 cprof.visualize(show=False, save=False)
292 assert not record
293
294
295@pytest.mark.skipif("not bokeh")

Callers

nothing calls this directly

Calls 5

CacheProfilerClass · 0.90
getFunction · 0.90
BOKEH_VERSIONFunction · 0.90
visualizeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…