def test_nan_plot(self):
        data = datasets.missing_data_1()
        espy = EventSpy(self.widget, OWLinearProjection.ReplotRequest)
        with excepthook_catch():
            self.send_signal(self.widget.Inputs.data, data)
            # ensure delayed replot request is processed
            if not espy.events():
                assert espy.wait(1000)

        cb = self.widget.graph.controls
        simulate.combobox_run_through_all(cb.attr_color)
        simulate.combobox_run_through_all(cb.attr_size)

        data = data.copy()
        data.X[:, 0] = np.nan
        data.Y[:] = np.nan

        spy = EventSpy(self.widget, OWLinearProjection.ReplotRequest)
        self.send_signal(self.widget.Inputs.data, data)
        self.send_signal(self.widget.Inputs.data_subset, data[2:3])
        if not spy.events():
            assert spy.wait()

        with excepthook_catch():
            simulate.combobox_activate_item(cb.attr_color, "X1")

        with excepthook_catch():
            simulate.combobox_activate_item(cb.attr_size, "X1")
Exemplo n.º 2
0
    def test_nan_plot(self):
        data = datasets.missing_data_1()
        espy = EventSpy(self.widget, OWLinearProjection.ReplotRequest)
        with excepthook_catch():
            self.send_signal(self.widget.Inputs.data, data)
            # ensure delayed replot request is processed
            if not espy.events():
                assert espy.wait(1000)

        cb = self.widget.graph.controls
        simulate.combobox_run_through_all(cb.attr_color)
        simulate.combobox_run_through_all(cb.attr_size)

        data = data.copy()
        data.X[:, 0] = np.nan
        data.Y[:] = np.nan

        spy = EventSpy(self.widget, OWLinearProjection.ReplotRequest)
        self.send_signal(self.widget.Inputs.data, data)
        self.send_signal(self.widget.Inputs.data_subset, data[2:3])
        if not spy.events():
            assert spy.wait()

        with excepthook_catch():
            simulate.combobox_activate_item(cb.attr_color, "X1")

        with excepthook_catch():
            simulate.combobox_activate_item(cb.attr_size, "X1")
Exemplo n.º 3
0
    def test_nan_plot(self):
        data = datasets.missing_data_1()
        self.send_signal(self.widget.Inputs.data, data)
        simulate.combobox_run_through_all(self.widget.controls.attr_color)
        simulate.combobox_run_through_all(self.widget.controls.attr_size)

        data.X[:, 0] = np.nan
        data.Y[:] = np.nan
        self.send_signal(self.widget.Inputs.data, data)
        self.send_signal(self.widget.Inputs.data_subset, data[2:3])
        simulate.combobox_run_through_all(self.widget.controls.attr_color)
        simulate.combobox_run_through_all(self.widget.controls.attr_size)
Exemplo n.º 4
0
    def test_nan_plot(self):
        data = datasets.missing_data_1()
        self.send_signal(self.widget.Inputs.data, data)
        simulate.combobox_run_through_all(self.widget.controls.attr_color)
        simulate.combobox_run_through_all(self.widget.controls.attr_size)

        data.X[:, 0] = np.nan
        data.Y[:] = np.nan
        self.send_signal(self.widget.Inputs.data, data)
        self.send_signal(self.widget.Inputs.data_subset, data[2:3])
        simulate.combobox_run_through_all(self.widget.controls.attr_color)
        simulate.combobox_run_through_all(self.widget.controls.attr_size)
Exemplo n.º 5
0
    def test_nan_plot(self):
        data = datasets.missing_data_1()
        espy = EventSpy(self.widget, OWLinearProjection.ReplotRequest)
        with excepthook_catch():
            self.send_signal("Data", data)
            # ensure delayed replot request is processed
            if not espy.events():
                assert espy.wait(1000)

        cb_color = self.widget.controls.color_index
        cb_size = self.widget.controls.size_index
        cb_shape = self.widget.controls.shape_index
        cb_jitter = self.widget.controls.jitter_value

        simulate.combobox_run_through_all(cb_color)
        simulate.combobox_run_through_all(cb_size)
        simulate.combobox_run_through_all(cb_shape)
        with excepthook_catch():
            simulate.combobox_activate_index(cb_jitter, 1, delay=1)

        data = data.copy()
        data.X[:, 0] = np.nan
        data.Y[:] = np.nan

        spy = EventSpy(self.widget, OWLinearProjection.ReplotRequest)
        self.send_signal("Data", data)
        self.send_signal("Data Subset", data[2:3])
        if not spy.events():
            assert spy.wait()

        with excepthook_catch():
            simulate.combobox_activate_item(cb_color, "X1")

        with excepthook_catch():
            simulate.combobox_activate_item(cb_size, "X1")

        with excepthook_catch():
            simulate.combobox_activate_item(cb_shape, "D")

        with excepthook_catch():
            simulate.combobox_activate_index(cb_jitter, 2, delay=1)
Exemplo n.º 6
0
    def test_nan_plot(self):
        def combobox_run_through_all():
            cb = self.widget.controls
            simulate.combobox_run_through_all(cb.attr_color)
            # simulate.combobox_run_through_all(cb.attr_shape)
            simulate.combobox_run_through_all(cb.attr_size)
            # simulate.combobox_run_through_all(cb.attr_label)

        data = datasets.missing_data_1()
        self.send_signal(self.widget.Inputs.data, data, wait=1000)
        combobox_run_through_all()

        self.send_signal(self.widget.Inputs.data, None)
        combobox_run_through_all()

        data.X[:, 0] = np.nan
        data.Y[:] = np.nan
        data.metas[:, 1] = np.nan

        self.send_signal(self.widget.Inputs.data, data, wait=1000)
        combobox_run_through_all()
Exemplo n.º 7
0
    def test_nan_plot(self):
        data = datasets.missing_data_1()
        self.send_signal(self.widget.Inputs.data, data)

        simulate.combobox_run_through_all(self.widget.cb_color_value)
        simulate.combobox_run_through_all(self.widget.cb_color_value)
        simulate.combobox_run_through_all(self.widget.cb_shape_value)
        simulate.combobox_run_through_all(self.widget.cb_size_value)
        simulate.combobox_run_through_all(self.widget.cb_label_value)

        self.send_signal(self.widget.Inputs.data, None)

        data.X[:, 0] = np.nan
        data.Y[:] = np.nan
        data.metas[:, 1] = np.nan

        self.send_signal("Data", data)

        simulate.combobox_run_through_all(self.widget.cb_color_value)
        simulate.combobox_run_through_all(self.widget.cb_shape_value)
        simulate.combobox_run_through_all(self.widget.cb_size_value)
        simulate.combobox_run_through_all(self.widget.cb_label_value)
Exemplo n.º 8
0
    def test_nan_plot(self):
        data = datasets.missing_data_1()
        self.send_signal(self.widget.Inputs.data, data, wait=1000)

        simulate.combobox_run_through_all(self.widget.cb_color_value)
        simulate.combobox_run_through_all(self.widget.cb_color_value)
        simulate.combobox_run_through_all(self.widget.cb_shape_value)
        simulate.combobox_run_through_all(self.widget.cb_size_value)
        simulate.combobox_run_through_all(self.widget.cb_label_value)

        self.send_signal(self.widget.Inputs.data, None)

        data.X[:, 0] = np.nan
        data.Y[:] = np.nan
        data.metas[:, 1] = np.nan

        self.send_signal("Data", data, wait=1000)

        simulate.combobox_run_through_all(self.widget.cb_color_value)
        simulate.combobox_run_through_all(self.widget.cb_shape_value)
        simulate.combobox_run_through_all(self.widget.cb_size_value)
        simulate.combobox_run_through_all(self.widget.cb_label_value)