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