def test_add_reset_event(self, df_type): bnac = BaseNonAggregate() bnac.chart_type = "test" bnac.x = "a" bnac.x_range = (0, 2) bnac.y_range = (3, 5) bnac.chart = hv.InteractiveDatashader() df = initialize_df(df_type, {"a": [1, 2, 2], "b": [3, 4, 5]}) dashboard = DashBoard(dataframe=DataFrame.from_dataframe(df)) dashboard._active_view = bnac def t_func1(event, fn): fn("event") bnac.add_event = t_func1 bnac.add_reset_event(dashboard) assert bnac.selected_indices is None
def test_add_reset_event(self): bnac = BaseNonAggregate() bnac.chart_type = "test" bnac.x = "a" bnac.x_range = (0, 2) bnac.y_range = (3, 5) df = cudf.DataFrame({"a": [1, 2, 2], "b": [3, 4, 5]}) dashboard = DashBoard(dataframe=DataFrame.from_dataframe(df)) dashboard._active_view = bnac def t_func1(event, fn): fn("event") bnac.add_event = t_func1 bnac.add_reset_event(dashboard) assert bnac.x_range is None assert bnac.y_range is None