def test_tabs_clone_args(): div1 = Div() div2 = Div() tabs = Tabs(div1, div2) clone = tabs.clone(div2, div1) assert tabs.objects[0].object is clone.objects[1].object assert tabs.objects[1].object is clone.objects[0].object
def test_tabs_clone_kwargs(): div1 = Div() div2 = Div() tabs = Tabs(div1, div2) clone = tabs.clone(width=400, sizing_mode='stretch_height') assert clone.width == 400 assert clone.sizing_mode == 'stretch_height'
def test_tabs_clone(): div1 = Div() div2 = Div() tabs = Tabs(Pane(div1), Pane(div2)) clone = tabs.clone() assert ([(k, v) for k, v in tabs.param.get_param_values() if k != 'name'] == [(k, v) for k, v in clone.param.get_param_values() if k != 'name'])