예제 #1
0
    def test_add_reset_event(self):
        bl = BaseLine(x="key", y="val")
        self.result = None

        def test_func(event, callback):
            self.result = callback

        bl.add_event = test_func
        # test the following function behavior
        bl.add_reset_event(self.dashboard)
        assert self.result.__name__ == "reset_callback"
    def test_add_reset_event(self, dashboard):
        bl = BaseLine(x="key", y="val")
        bl.chart = hv.InteractiveDatashader()
        self.result = None

        def test_func(event, callback):
            self.result = callback

        bl.add_event = test_func
        # test the following function behavior
        bl.add_reset_event(dashboard)
        assert bl.selected_indices is None