@@ -84,7 +84,7 @@ def test_hover_tool_instance_renderer_association(self):
8484 assert plot .handles ['hover' ].tooltips == tooltips
8585
8686 # def test_hover_tool_overlay_renderers(self):
87- # overlay = Curve(range(2)).opts(tools=['hover']) * ErrorBars([]).opts(tools=['hover'])
87+ # overlay = hv. Curve(range(2)).opts(tools=['hover']) * ErrorBars([]).opts(tools=['hover'])
8888 # plot = bokeh_renderer.get_plot(overlay)
8989 # assert len(plot.handles['hover'].renderers) == 1
9090 # assert plot.handles['hover'].tooltips == [('x', '@{x}'), ('y', '@{y}')]
@@ -427,7 +427,7 @@ def test_ndoverlay_categorical_y_ranges(order):
427427 (["zoom_in" , "zoom_out" ], ["ZoomInTool" , "ZoomOutTool" ])
428428 ], ids = ["none" , "zoom_in" , "zoom_in_and_zoom_out" ])
429429def test_overlay_opts_tools (tools , new_tools ):
430- overlay = Curve ([1 , 2 , 3 ]) * Curve ([2 , 3 , 4 ])
430+ overlay = hv . Curve ([1 , 2 , 3 ]) * hv . Curve ([2 , 3 , 4 ])
431431 if tools is not None :
432432 overlay .opts (tools = tools )
433433 plot = bokeh_renderer .get_plot (overlay )
@@ -438,15 +438,15 @@ def test_overlay_opts_tools(tools, new_tools):
438438
439439
440440def test_overlay_opts_tools_with_element_tools ():
441- overlay = Curve ([1 , 2 , 3 ]).opts (tools = ['zoom_out' ]) * Curve ([2 , 3 , 4 ]).opts (tools = ['zoom_in' ])
441+ overlay = hv . Curve ([1 , 2 , 3 ]).opts (tools = ['zoom_out' ]) * hv . Curve ([2 , 3 , 4 ]).opts (tools = ['zoom_in' ])
442442 plot = bokeh_renderer .get_plot (overlay )
443443
444444 tool_types = [type (tool ).__name__ for tool in plot .state .tools ]
445445 defaults = ['WheelZoomTool' , 'SaveTool' , 'PanTool' , 'BoxZoomTool' , 'ResetTool' ]
446446 assert tool_types == [defaults [0 ], "ZoomOutTool" , "ZoomInTool" , * defaults [1 :]]
447447
448448def test_overlay_default_tools_not_duplicated ():
449- overlay = Curve ([1 , 2 , 3 ]) * Curve ([2 , 3 , 4 ])
449+ overlay = hv . Curve ([1 , 2 , 3 ]) * hv . Curve ([2 , 3 , 4 ])
450450 plot = bokeh_renderer .get_plot (overlay )
451451
452452 # Count each tool type
@@ -471,7 +471,7 @@ def test_overlay_default_tools_not_duplicated():
471471 ids = ["directional_only" , "generic_and_directional" ],
472472)
473473def test_overlay_opts_directional_pan_tools (tool_strings , expected_dimensions , expected_count ):
474- overlay = (Curve ([1 , 2 , 3 ]) * Curve ([2 , 3 , 4 ])).opts (tools = tool_strings )
474+ overlay = (hv . Curve ([1 , 2 , 3 ]) * hv . Curve ([2 , 3 , 4 ])).opts (tools = tool_strings )
475475 plot = bokeh_renderer .get_plot (overlay )
476476
477477 tools = [tool for tool in plot .state .tools if type (tool ).__name__ == "PanTool" ]
@@ -491,7 +491,7 @@ def test_overlay_opts_directional_pan_tools(tool_strings, expected_dimensions, e
491491 ids = ["directional_only" , "generic_and_directional" ],
492492)
493493def test_overlay_opts_directional_zoom_in_tools (tool_strings , expected_dimensions , expected_count ):
494- overlay = (Curve ([1 , 2 , 3 ]) * Curve ([2 , 3 , 4 ])).opts (tools = tool_strings )
494+ overlay = (hv . Curve ([1 , 2 , 3 ]) * hv . Curve ([2 , 3 , 4 ])).opts (tools = tool_strings )
495495 plot = bokeh_renderer .get_plot (overlay )
496496
497497 tools = [tool for tool in plot .state .tools if type (tool ).__name__ == "ZoomInTool" ]
@@ -511,7 +511,7 @@ def test_overlay_opts_directional_zoom_in_tools(tool_strings, expected_dimension
511511 ids = ["directional_only" , "generic_and_directional" ],
512512)
513513def test_overlay_opts_directional_box_zoom_tools (tool_strings , expected_dimensions , expected_count ):
514- overlay = (Curve ([1 , 2 , 3 ]) * Curve ([2 , 3 , 4 ])).opts (tools = tool_strings )
514+ overlay = (hv . Curve ([1 , 2 , 3 ]) * hv . Curve ([2 , 3 , 4 ])).opts (tools = tool_strings )
515515 plot = bokeh_renderer .get_plot (overlay )
516516
517517 tools = [tool for tool in plot .state .tools if type (tool ).__name__ == "BoxZoomTool" ]
@@ -523,8 +523,8 @@ def test_overlay_opts_directional_box_zoom_tools(tool_strings, expected_dimensio
523523
524524def test_overlay_opts_mixed_tools_no_duplicates ():
525525 overlay = (
526- Curve ([1 , 2 , 3 ]).opts (tools = ['xpan' ]) *
527- Curve ([2 , 3 , 4 ]).opts (tools = ['xpan' ])
526+ hv . Curve ([1 , 2 , 3 ]).opts (tools = ['xpan' ]) *
527+ hv . Curve ([2 , 3 , 4 ]).opts (tools = ['xpan' ])
528528 ).opts (tools = ['xpan' ])
529529 plot = bokeh_renderer .get_plot (overlay )
530530
@@ -535,7 +535,7 @@ def test_overlay_opts_mixed_tools_no_duplicates():
535535
536536
537537def test_overlay_opts_xwheel_pan_ywheel_pan_distinct ():
538- overlay = (Curve ([1 , 2 , 3 ]) * Curve ([2 , 3 , 4 ])).opts (tools = ['xwheel_pan' , 'ywheel_pan' ])
538+ overlay = (hv . Curve ([1 , 2 , 3 ]) * hv . Curve ([2 , 3 , 4 ])).opts (tools = ['xwheel_pan' , 'ywheel_pan' ])
539539 plot = bokeh_renderer .get_plot (overlay )
540540
541541 wheel_pan_tools = [t for t in plot .state .tools if isinstance (t , bk_tools .WheelPanTool )]
@@ -545,16 +545,16 @@ def test_overlay_opts_xwheel_pan_ywheel_pan_distinct():
545545
546546
547547def test_overlay_opts_tap_doubletap_distinct ():
548- overlay = (Curve ([1 , 2 , 3 ]) * Curve ([2 , 3 , 4 ])).opts (tools = ['tap' , 'doubletap' ])
548+ overlay = (hv . Curve ([1 , 2 , 3 ]) * hv . Curve ([2 , 3 , 4 ])).opts (tools = ['tap' , 'doubletap' ])
549549 plot = bokeh_renderer .get_plot (overlay )
550550
551551 tap_tools = [t for t in plot .state .tools if isinstance (t , bk_tools .TapTool )]
552552 assert len (tap_tools ) == 2
553553
554554
555555def test_overlay_hover_string_not_blocked_by_subplot_hover ():
556- curve1 = Curve ([1 , 2 , 3 ]).opts (tools = [HoverTool (tooltips = [('x' , '@x' )])])
557- curve2 = Curve ([2 , 3 , 4 ]).opts (tools = [HoverTool (tooltips = [('y' , '@y' )])])
556+ curve1 = hv . Curve ([1 , 2 , 3 ]).opts (tools = [HoverTool (tooltips = [('x' , '@x' )])])
557+ curve2 = hv . Curve ([2 , 3 , 4 ]).opts (tools = [HoverTool (tooltips = [('y' , '@y' )])])
558558 overlay = curve1 * curve2
559559 plot = bokeh_renderer .get_plot (overlay )
560560
0 commit comments