def test_choose_vmin_vmax(self): assert self.mode.get_vmin_vmax() == (None, None) def fill_apply(dialog): dialog.vmin.setText('5') dialog.vmax.setText('7') dialog.accept() with process_dialog(delay=500, function=fill_apply): self.mode.choose_vmin_vmax()
def test_suggest_merge(self): x = Data(x=[1, 2, 3], label='x') y = Data(y=[4, 5, 6, 7], label='y') z = Data(z=[8, 9, 10], label='z') self.app.data_collection.append(x) self.app.data_collection.append(y) with process_dialog(delay=500, accept=True): result = self.app.add_datasets(self.app.data_collection, z) np.testing.assert_equal(self.app.data_collection[0]['x'], [1, 2, 3]) np.testing.assert_equal(self.app.data_collection[0]['z'], [8, 9, 10]) np.testing.assert_equal(self.app.data_collection[1]['y'], [4, 5, 6, 7])