()
| 303 | @pytest.mark.skipif("not bokeh") |
| 304 | @pytest.mark.skipif("not psutil") |
| 305 | def 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") |
nothing calls this directly
no test coverage detected
searching dependent graphs…