def test_add_events(self, event, result): bl = BaseLine(x="key", y="val") self.result = None def test_func(cls): self.result = "func_Called" bl.add_reset_event = test_func bl.reset_event = event # test the following function behavior bl.add_events(self.dashboard) assert self.result == result
def test_add_events(self, dashboard, event, result): bl = BaseLine(x="key", y="val") bl.chart = hv.InteractiveDatashader() self.result = None def test_func(cls): self.result = "func_Called" bl.add_reset_event = test_func bl.reset_event = event # test the following function behavior bl.add_events(dashboard) assert self.result == result