MCPcopy
hub / github.com/dask/dask / test_plot_multiple

Function test_plot_multiple

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

Source from the content-addressed store, hash-verified

303@pytest.mark.skipif("not bokeh")
304@pytest.mark.skipif("not psutil")
305def test_plot_multiple():
306 from dask.diagnostics.profile_visualize import visualize
307
308 with ResourceProfiler(dt=0.01) as rprof:
309 with prof:
310 get(dsk2, "c")
311 p = visualize(
312 [prof, rprof], label_size=50, title="Not the default", show=False, save=False
313 )
314 # Grid plot layouts changed in Bokeh 3.
315 # See https://github.com/dask/dask/issues/9257 for more details
316 if BOKEH_VERSION().major < 3:
317 figures = [r[0] for r in p.children[1].children]
318 else:
319 figures = [r[0] for r in p.children]
320 assert len(figures) == 2
321 assert figures[0].title.text == "Not the default"
322 assert figures[0].xaxis[0].axis_label is None
323 assert figures[1].title is None
324 assert figures[1].xaxis[0].axis_label == "Time (s)"
325 # Test empty, checking for errors
326 prof.clear()
327 rprof.clear()
328 visualize([prof, rprof], show=False, save=False)
329
330
331@pytest.mark.skipif("not bokeh")

Callers

nothing calls this directly

Calls 5

ResourceProfilerClass · 0.90
getFunction · 0.90
visualizeFunction · 0.90
BOKEH_VERSIONFunction · 0.90
clearMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…