diff --git a/Orange/widgets/data/tests/test_owcolor.py b/Orange/widgets/data/tests/test_owcolor.py index f48607e1065..b371a954daa 100644 --- a/Orange/widgets/data/tests/test_owcolor.py +++ b/Orange/widgets/data/tests/test_owcolor.py @@ -703,25 +703,6 @@ def test_report(self): def test_string_variables(self): self.send_signal(self.widget.Inputs.data, Table("zoo")) - def test_summary(self): - """Check if the status bar is updated when data is received""" - data = self.iris - input_sum = self.widget.info.set_input_summary = Mock() - output_sum = self.widget.info.set_output_summary = Mock() - - self.send_signal(self.widget.Inputs.data, data) - input_sum.assert_called_with(len(data), format_summary_details(data)) - output = self.get_output(self.widget.Outputs.data) - output_sum.assert_called_with(len(output), - format_summary_details(output)) - input_sum.reset_mock() - output_sum.reset_mock() - self.send_signal(self.widget.Inputs.data, None) - input_sum.assert_called_once() - self.assertIsInstance(input_sum.call_args[0][0], StateInfo.Empty) - output_sum.assert_called_once() - self.assertIsInstance(output_sum.call_args[0][0], StateInfo.Empty) - def test_reset(self): self.send_signal(self.widget.Inputs.data, self.iris) cont_model = self.widget.cont_model diff --git a/Orange/widgets/data/tests/test_owcontinuize.py b/Orange/widgets/data/tests/test_owcontinuize.py index 57d3482526e..f86341bf898 100644 --- a/Orange/widgets/data/tests/test_owcontinuize.py +++ b/Orange/widgets/data/tests/test_owcontinuize.py @@ -43,27 +43,6 @@ def test_empty_data(self): imp_data = self.get_output(self.widget.Outputs.data) self.assertIsNone(imp_data) - def test_summary(self): - """Check if status bar is updated when data is received""" - data = Table("iris") - input_sum = self.widget.info.set_input_summary = Mock() - output_sum = self.widget.info.set_output_summary = Mock() - - self.send_signal(self.widget.Inputs.data, data) - input_sum.assert_called_with(len(data), - format_summary_details(data)) - output = self.get_output(self.widget.Outputs.data) - output_sum.assert_called_with(len(output), - format_summary_details(output)) - - input_sum.reset_mock() - output_sum.reset_mock() - self.send_signal(self.widget.Inputs.data, None) - input_sum.assert_called_once() - self.assertIsInstance(input_sum.call_args[0][0], StateInfo.Empty) - output_sum.assert_called_once() - self.assertIsInstance(output_sum.call_args[0][0], StateInfo.Empty) - def test_continuous(self): table = Table("housing") self.send_signal(self.widget.Inputs.data, table) diff --git a/Orange/widgets/data/tests/test_owcorrelations.py b/Orange/widgets/data/tests/test_owcorrelations.py index 062926333c3..02c247f4f63 100644 --- a/Orange/widgets/data/tests/test_owcorrelations.py +++ b/Orange/widgets/data/tests/test_owcorrelations.py @@ -303,26 +303,6 @@ def test_send_report(self): self.send_signal(self.widget.Inputs.data, None) self.widget.report_button.click() - def test_summary(self): - """Check if status bar is updated when data is received""" - data = Table("iris") - input_sum = self.widget.info.set_input_summary = Mock() - output_sum = self.widget.info.set_output_summary = Mock() - - self.send_signal(self.widget.Inputs.data, data) - input_sum.assert_called_with(len(data), format_summary_details(data)) - output = self.get_output(self.widget.Outputs.data) - output_sum.assert_called_with(len(output), - format_summary_details(output)) - - input_sum.reset_mock() - output_sum.reset_mock() - self.send_signal(self.widget.Inputs.data, None) - input_sum.assert_called_once() - self.assertIsInstance(input_sum.call_args[0][0], StateInfo.Empty) - output_sum.assert_called_once() - self.assertIsInstance(output_sum.call_args[0][0], StateInfo.Empty) - class TestCorrelationRank(WidgetTest): @classmethod diff --git a/Orange/widgets/data/tests/test_owcsvimport.py b/Orange/widgets/data/tests/test_owcsvimport.py index 03400f9013e..9392ce01913 100644 --- a/Orange/widgets/data/tests/test_owcsvimport.py +++ b/Orange/widgets/data/tests/test_owcsvimport.py @@ -147,25 +147,6 @@ def test_restore_from_local(self): ) self._check_data_regions(self.get_output("Data", w)) - def test_summary(self): - """Check if status bar is updated when data is received""" - dirname = os.path.dirname(__file__) - path = os.path.join(dirname, "data-regions.tab") - widget = self.create_widget( - owcsvimport.OWCSVFileImport, - stored_settings={ - "_session_items": [ - (path, self.data_regions_options.as_dict()) - ] - } - ) - output_sum = widget.info.set_output_summary = mock.Mock() - widget.commit() - self.wait_until_finished(widget) - output = self.get_output("Data", widget) - output_sum.assert_called_with(len(output), - format_summary_details(output)) - data_csv_types_options = owcsvimport.Options( encoding="ascii", dialect=csv.excel_tab(), columntypes=[ diff --git a/Orange/widgets/data/tests/test_owdatasampler.py b/Orange/widgets/data/tests/test_owdatasampler.py index 252e079fa62..d0f76866c8b 100644 --- a/Orange/widgets/data/tests/test_owdatasampler.py +++ b/Orange/widgets/data/tests/test_owdatasampler.py @@ -122,26 +122,6 @@ def test_shuffling(self): self.assertTrue((self.iris.ids != sample.ids).any()) self.assertEqual(set(self.iris.ids), set(sample.ids)) - def test_summary(self): - """Check if status bar is updated when data is received""" - data = self.iris - input_sum = self.widget.info.set_input_summary = Mock() - output_sum = self.widget.info.set_output_summary = Mock() - - self.send_signal(self.widget.Inputs.data, data) - input_sum.assert_called_with(len(data), format_summary_details(data)) - output = self.get_output(self.widget.Outputs.data_sample) - output_sum.assert_called_with(len(output), - format_summary_details(output)) - - input_sum.reset_mock() - output_sum.reset_mock() - self.send_signal(self.widget.Inputs.data, None) - input_sum.assert_called_once() - self.assertIsInstance(input_sum.call_args[0][0], StateInfo.Empty) - output_sum.assert_called_once() - self.assertIsInstance(output_sum.call_args[0][0], StateInfo.Empty) - def set_fixed_sample_size(self, sample_size, with_replacement=False): """Set fixed sample size and return the number of gui spin. diff --git a/Orange/widgets/data/tests/test_owdatasets.py b/Orange/widgets/data/tests/test_owdatasets.py index 45c3d7e3a18..eac40dae00f 100644 --- a/Orange/widgets/data/tests/test_owdatasets.py +++ b/Orange/widgets/data/tests/test_owdatasets.py @@ -76,24 +76,6 @@ def test_dir_depth(self): self.wait_until_stop_blocking(w) self.assertEqual(w.view.model().rowCount(), 2) - @patch("Orange.widgets.data.owdatasets.list_remote", - Mock(return_value={('core', 'iris.tab'): {}})) - @patch("Orange.widgets.data.owdatasets.list_local", - Mock(return_value={})) - @patch("Orange.widgets.data.owdatasets.ensure_local", - Mock(return_value="iris.tab")) - def test_summary(self): - """Check if status bar is updated when data is received""" - widget = self.create_widget(OWDataSets) - output_sum = widget.info.set_output_summary = Mock() - self.wait_until_stop_blocking(widget) - # select the only dataset - sel_type = QItemSelectionModel.ClearAndSelect | QItemSelectionModel.Rows - widget.view.selectionModel().select(widget.view.model().index(0, 0), sel_type) - widget.commit() - output = self.get_output(widget.Outputs.data, widget) - output_sum.assert_called_with(len(output), - format_summary_details(output)) if __name__ == "__main__": unittest.main() diff --git a/Orange/widgets/data/tests/test_owdiscretize.py b/Orange/widgets/data/tests/test_owdiscretize.py index 2d36b0a1e1e..fe594d28c42 100644 --- a/Orange/widgets/data/tests/test_owdiscretize.py +++ b/Orange/widgets/data/tests/test_owdiscretize.py @@ -35,26 +35,6 @@ def test_empty_data(self): widget.unconditional_commit() self.assertIsNotNone(self.get_output(widget.Outputs.data)) - def test_summary(self): - """Check if status bar is updated when data is received""" - input_sum = self.widget.info.set_input_summary = Mock() - output_sum = self.widget.info.set_output_summary = Mock() - - data = Table("iris") - self.send_signal(self.widget.Inputs.data, data) - input_sum.assert_called_with(len(data), format_summary_details(data)) - output = self.get_output(self.widget.Outputs.data) - output_sum.assert_called_with(len(output), - format_summary_details(output)) - - input_sum.reset_mock() - output_sum.reset_mock() - self.send_signal(self.widget.Inputs.data, None) - input_sum.assert_called_once() - self.assertIsInstance(input_sum.call_args[0][0], StateInfo.Empty) - output_sum.assert_called_once() - self.assertIsInstance(output_sum.call_args[0][0], StateInfo.Empty) - def test_select_method(self): widget = self.widget data = Table("iris")[::5] diff --git a/Orange/widgets/data/tests/test_oweditdomain.py b/Orange/widgets/data/tests/test_oweditdomain.py index 57f92634a34..b339f7f860e 100644 --- a/Orange/widgets/data/tests/test_oweditdomain.py +++ b/Orange/widgets/data/tests/test_oweditdomain.py @@ -318,45 +318,6 @@ def restore(state): tr = model.data(model.index(4), TransformRole) self.assertEqual(tr, [AsString(), Rename("Z")]) - def test_summary(self): - """Check if status bar is updated when data is received""" - data = Table("iris") - input_sum = self.widget.info.set_input_summary = Mock() - output_sum = self.widget.info.set_output_summary = Mock() - - self.send_signal(self.widget.Inputs.data, data) - input_sum.assert_called_with(len(data), format_summary_details(data)) - output = self.get_output(self.widget.Outputs.data) - output_sum.assert_called_with(len(output), - format_summary_details(output)) - - def enter_text(widget, text): - # type: (QLineEdit, str) -> None - widget.selectAll() - QTest.keyClick(widget, Qt.Key_Delete) - QTest.keyClicks(widget, text) - QTest.keyClick(widget, Qt.Key_Return) - - editor = self.widget.findChild(ContinuousVariableEditor) - enter_text(editor.name_edit, "sepal height") - self.widget.commit() - output = self.get_output(self.widget.Outputs.data) - output_sum.assert_called_with(len(output), - format_summary_details(output)) - output_sum.reset_mock() - enter_text(editor.name_edit, "sepal width") - self.widget.commit() - output_sum.assert_called_once() - self.assertIsInstance(output_sum.call_args[0][0], StateInfo.Empty) - - input_sum.reset_mock() - output_sum.reset_mock() - self.send_signal(self.widget.Inputs.data, None) - input_sum.assert_called_once() - self.assertIsInstance(input_sum.call_args[0][0], StateInfo.Empty) - output_sum.assert_called_once() - self.assertIsInstance(output_sum.call_args[0][0], StateInfo.Empty) - class TestEditors(GuiTest): def test_variable_editor(self): diff --git a/Orange/widgets/data/tests/test_owfeatureconstructor.py b/Orange/widgets/data/tests/test_owfeatureconstructor.py index dc474694bea..17eb31638b4 100644 --- a/Orange/widgets/data/tests/test_owfeatureconstructor.py +++ b/Orange/widgets/data/tests/test_owfeatureconstructor.py @@ -361,26 +361,6 @@ def test_discrete_no_values(self): self.widget.apply() self.assertTrue(self.widget.Error.more_values_needed.is_shown()) - def test_summary(self): - """Check if status bar is updated when data is received""" - data = Table("iris") - input_sum = self.widget.info.set_input_summary = Mock() - output_sum = self.widget.info.set_output_summary = Mock() - - self.send_signal(self.widget.Inputs.data, data) - input_sum.assert_called_with(len(data), format_summary_details(data)) - output = self.get_output(self.widget.Outputs.data) - output_sum.assert_called_with(len(output), - format_summary_details(output)) - - input_sum.reset_mock() - output_sum.reset_mock() - self.send_signal(self.widget.Inputs.data, None) - input_sum.assert_called_once() - self.assertIsInstance(input_sum.call_args[0][0], StateInfo.Empty) - output_sum.assert_called_once() - self.assertIsInstance(output_sum.call_args[0][0], StateInfo.Empty) - class TestFeatureEditor(unittest.TestCase): def test_has_functions(self): diff --git a/Orange/widgets/data/tests/test_owfeaturestatistics.py b/Orange/widgets/data/tests/test_owfeaturestatistics.py index 269a6e543c2..5a409f8867a 100644 --- a/Orange/widgets/data/tests/test_owfeaturestatistics.py +++ b/Orange/widgets/data/tests/test_owfeaturestatistics.py @@ -514,28 +514,6 @@ def setUp(self): ) self.select_rows = partial(select_rows, widget=self.widget) - def test_summary(self): - """Check if the status bar is updated when data is received""" - data = self.data - input_sum = self.widget.info.set_input_summary = Mock() - output_sum = self.widget.info.set_output_summary = Mock() - - self.send_signal(self.widget.Inputs.data, data) - input_sum.assert_called_with(len(data), format_summary_details(data)) - - self.select_rows([0, 2]) - self.widget.unconditional_commit() - output = self.get_output(self.widget.Outputs.reduced_data) - output_sum.assert_called_with(len(output), format_summary_details(output)) - - input_sum.reset_mock() - output_sum.reset_mock() - self.send_signal(self.widget.Inputs.data, None) - input_sum.assert_called_once() - self.assertIsInstance(input_sum.call_args[0][0], StateInfo.Empty) - output_sum.assert_called_once() - self.assertIsInstance(output_sum.call_args[0][0], StateInfo.Empty) - if __name__ == "__main__": unittest.main() diff --git a/Orange/widgets/data/tests/test_owfile.py b/Orange/widgets/data/tests/test_owfile.py index a3c4a14d4fd..a08f0a0c140 100644 --- a/Orange/widgets/data/tests/test_owfile.py +++ b/Orange/widgets/data/tests/test_owfile.py @@ -546,14 +546,6 @@ def test_adds_origin(self): self.assertIn("origin", attrs) self.assertIn("origin1", attrs["origin"]) - def test_summary(self): - """Check if the status bar is updated when data is received""" - output_sum = self.widget.info.set_output_summary = Mock() - self.open_dataset("iris") - output = self.get_output(self.widget.Outputs.data) - output_sum.assert_called_with(len(output), - format_summary_details(output)) - @patch("Orange.widgets.widget.OWWidget.workflowEnv", Mock(return_value={"basedir": getcwd()})) def test_open_moved_workflow(self): diff --git a/Orange/widgets/data/tests/test_owimpute.py b/Orange/widgets/data/tests/test_owimpute.py index ddcd7433be5..3b8a4cbe9c0 100644 --- a/Orange/widgets/data/tests/test_owimpute.py +++ b/Orange/widgets/data/tests/test_owimpute.py @@ -215,28 +215,3 @@ def effective_method(var): self.assertEqual(varbg.checkedId(), Method.Default) self.assertEqual(widget.value_combo.currentIndex(), 1) - def test_summary(self): - """Check if the status bar is updated when data is received""" - data = Table("heart_disease") - input_sum = self.widget.info.set_input_summary = Mock() - output_sum = self.widget.info.set_output_summary = Mock() - - self.send_signal(self.widget.Inputs.data, data) - input_sum.assert_called_with(len(data), format_summary_details(data)) - output = self.get_output(self.widget.Outputs.data) - output_sum.assert_called_with(len(output), - format_summary_details(output)) - - varbg = self.widget.variable_button_group - varbg.button(Method.AsValue).click() - output = self.get_output(self.widget.Outputs.data) - output_sum.assert_called_with(len(output), - format_summary_details(output)) - - input_sum.reset_mock() - output_sum.reset_mock() - self.send_signal(self.widget.Inputs.data, None) - input_sum.assert_called_once() - self.assertIsInstance(input_sum.call_args[0][0], StateInfo.Empty) - output_sum.assert_called_once() - self.assertIsInstance(output_sum.call_args[0][0], StateInfo.Empty) diff --git a/Orange/widgets/data/tests/test_owpivot.py b/Orange/widgets/data/tests/test_owpivot.py index fa7d8a4625d..6a6b0dacffe 100644 --- a/Orange/widgets/data/tests/test_owpivot.py +++ b/Orange/widgets/data/tests/test_owpivot.py @@ -245,39 +245,6 @@ def test_send_report(self): self.send_signal(self.widget.Inputs.data, None) self.widget.report_button.click() - def test_summary(self): - """Check if the status bar is updated when data is received""" - data = self.iris - input_sum = self.widget.info.set_input_summary = Mock() - output_sum = self.widget.info.set_output_summary = Mock() - - self.send_signal(self.widget.Inputs.data, data) - input_sum.assert_called_with(len(data), format_summary_details(data)) - output = self.get_output(self.widget.Outputs.filtered_data) - self.assertIsNone(output) - simulate.combobox_activate_item(self.widget.controls.row_feature, - self.iris.domain.attributes[0].name) - simulate.combobox_activate_item(self.widget.controls.col_feature, - self.iris.domain.class_var.name) - self.widget.table_view.set_selection(set([(11, 0), (11, 1), (12, 0)])) - self.widget.table_view.selection_changed.emit() - filtered = self.get_output(self.widget.Outputs.filtered_data) - pivot = self.get_output(self.widget.Outputs.pivot_table) - grouped = self.get_output(self.widget.Outputs.grouped_data) - output_sum.assert_called_with( - f"{len(pivot)}, {len(filtered)}, {len(grouped)}", - format_multiple_summaries([("Pivot table", pivot), - ("Filtered data", filtered), - ("Grouped data", grouped)]), - format=1) - input_sum.reset_mock() - output_sum.reset_mock() - self.send_signal(self.widget.Inputs.data, None) - input_sum.assert_called_once() - self.assertIsInstance(input_sum.call_args[0][0], StateInfo.Empty) - output_sum.assert_called_once() - self.assertIsInstance(output_sum.call_args[0][0], StateInfo.Empty) - def test_renaming_warning(self): data = Table('iris') cls_var = data.domain.class_var.copy(name='Aggregate') diff --git a/Orange/widgets/data/tests/test_owpreprocess.py b/Orange/widgets/data/tests/test_owpreprocess.py index a8e404a424a..75b948e3b96 100644 --- a/Orange/widgets/data/tests/test_owpreprocess.py +++ b/Orange/widgets/data/tests/test_owpreprocess.py @@ -142,26 +142,6 @@ def test_data_column_nans(self): self.widget.set_model(model) self.send_signal(self.widget.Inputs.data, table) - def test_summary(self): - """Check if status bar is updated when data is received""" - data = Table("iris") - input_sum = self.widget.info.set_input_summary = Mock() - output_sum = self.widget.info.set_output_summary = Mock() - - self.send_signal(self.widget.Inputs.data, data) - input_sum.assert_called_with(len(data), format_summary_details(data)) - output = self.get_output(self.widget.Outputs.preprocessed_data) - output_sum.assert_called_with(len(output), - format_summary_details(output)) - - input_sum.reset_mock() - output_sum.reset_mock() - self.send_signal(self.widget.Inputs.data, None) - input_sum.assert_called_once() - self.assertIsInstance(input_sum.call_args[0][0], StateInfo.Empty) - output_sum.assert_called_once() - self.assertIsInstance(output_sum.call_args[0][0], StateInfo.Empty) - # Test for editors class TestDiscretizeEditor(WidgetTest): diff --git a/Orange/widgets/data/tests/test_owpurgedomain.py b/Orange/widgets/data/tests/test_owpurgedomain.py index 37ad2b6e141..8c0cd2b3e52 100644 --- a/Orange/widgets/data/tests/test_owpurgedomain.py +++ b/Orange/widgets/data/tests/test_owpurgedomain.py @@ -15,25 +15,6 @@ def setUp(self): self.widget = self.create_widget(OWPurgeDomain) self.iris = Table("iris") - def test_summary(self): - """Check if the status bar is updated when data is received""" - data = self.iris - input_sum = self.widget.info.set_input_summary = Mock() - output_sum = self.widget.info.set_output_summary = Mock() - - self.send_signal(self.widget.Inputs.data, data) - input_sum.assert_called_with(len(data), format_summary_details(data)) - output = self.get_output(self.widget.Outputs.data) - output_sum.assert_called_with(len(output), - format_summary_details(output)) - input_sum.reset_mock() - output_sum.reset_mock() - self.send_signal(self.widget.Inputs.data, None) - input_sum.assert_called_once() - self.assertIsInstance(input_sum.call_args[0][0], StateInfo.Empty) - output_sum.assert_called_once() - self.assertIsInstance(output_sum.call_args[0][0], StateInfo.Empty) - def test_minimum_size(self): pass diff --git a/Orange/widgets/data/tests/test_owrandomize.py b/Orange/widgets/data/tests/test_owrandomize.py index aacfbb12c98..fc11531f932 100644 --- a/Orange/widgets/data/tests/test_owrandomize.py +++ b/Orange/widgets/data/tests/test_owrandomize.py @@ -77,26 +77,6 @@ def test_replicable_shuffling(self): np.testing.assert_array_equal(output.Y, output2.Y) np.testing.assert_array_equal(output.metas, output2.metas) - def test_summary(self): - """"Check if status bar displays correct input/output summary""" - output_sum = self.widget.info.set_output_summary = Mock() - input_sum = self.widget.info.set_input_summary = Mock() - - data = self.zoo - self.send_signal(self.widget.Inputs.data, data) - input_sum.assert_called_with(len(data), - format_summary_details(data)) - output = self.get_output(self.widget.Outputs.data) - output_sum.assert_called_with(len(output), - format_summary_details(output)) - input_sum.reset_mock() - output_sum.reset_mock() - self.send_signal(self.widget.Inputs.data, None) - input_sum.assert_called_once() - self.assertIsInstance(input_sum.call_args[0][0], StateInfo.Empty) - output_sum.assert_called_once() - self.assertIsInstance(output_sum.call_args[0][0], StateInfo.Empty) - def test_unconditional_commit_on_new_signal(self): with patch.object(self.widget, 'unconditional_apply') as apply: self.widget.auto_apply = False diff --git a/Orange/widgets/data/tests/test_owrank.py b/Orange/widgets/data/tests/test_owrank.py index d2c5522ac82..9ce1254a52e 100644 --- a/Orange/widgets/data/tests/test_owrank.py +++ b/Orange/widgets/data/tests/test_owrank.py @@ -472,28 +472,6 @@ def test_selected_rows(self): self.assertEqual(len(output), len(self.iris)) - def test_summary(self): - """Check if the status bar is updated when data is received""" - data = self.iris - input_sum = self.widget.info.set_input_summary = Mock() - output_sum = self.widget.info.set_output_summary = Mock() - - self.send_signal(self.widget.Inputs.data, data) - self.wait_until_finished() - input_sum.assert_called_with(len(data), format_summary_details(data)) - output = self.get_output(self.widget.Outputs.reduced_data) - output_sum.assert_called_with(len(output), - format_summary_details(output)) - - input_sum.reset_mock() - output_sum.reset_mock() - self.send_signal(self.widget.Inputs.data, None) - self.wait_until_finished() - input_sum.assert_called_once() - self.assertIsInstance(input_sum.call_args[0][0], StateInfo.Empty) - output_sum.assert_called_once() - self.assertIsInstance(output_sum.call_args[0][0], StateInfo.Empty) - def test_concurrent_cancel(self): """ Send one signal after another. It test if the first process get diff --git a/Orange/widgets/data/tests/test_owselectcolumns.py b/Orange/widgets/data/tests/test_owselectcolumns.py index e0c473f511e..dfc20fc96bc 100644 --- a/Orange/widgets/data/tests/test_owselectcolumns.py +++ b/Orange/widgets/data/tests/test_owselectcolumns.py @@ -379,26 +379,6 @@ def test_move_rows(self): data.domain.attributes ) - def test_summary(self): - """Check if status bar is updated when data is received""" - input_sum = self.widget.info.set_input_summary = Mock() - output_sum = self.widget.info.set_output_summary = Mock() - - data = Table("iris") - self.send_signal(self.widget.Inputs.data, data) - input_sum.assert_called_with(len(data), format_summary_details(data)) - output = self.get_output(self.widget.Outputs.data) - output_sum.assert_called_with(len(output), - format_summary_details(output)) - - input_sum.reset_mock() - output_sum.reset_mock() - self.send_signal(self.widget.Inputs.data, None) - input_sum.assert_called_once() - self.assertIsInstance(input_sum.call_args[0][0], StateInfo.Empty) - output_sum.assert_called_once() - self.assertIsInstance(output_sum.call_args[0][0], StateInfo.Empty) - def test_domain_new_feature(self): """ Test scenario when new attribute is added at position 0 """ data = Table("iris") diff --git a/Orange/widgets/data/tests/test_owselectrows.py b/Orange/widgets/data/tests/test_owselectrows.py index 955967bcbe1..1d48f9b086e 100644 --- a/Orange/widgets/data/tests/test_owselectrows.py +++ b/Orange/widgets/data/tests/test_owselectrows.py @@ -396,30 +396,6 @@ def test_is_defined_on_continuous_variable(self): # Test saving of settings self.widget.settingsHandler.pack_data(self.widget) - def test_summary(self): - """Check if status bar displays correct input/output summary""" - input_sum = self.widget.info.set_input_summary = Mock() - output_sum = self.widget.info.set_output_summary = Mock() - - data = Table("iris") - self.send_signal(self.widget.Inputs.data, data) - input_sum.assert_called_with(len(data), format_summary_details(data)) - output = self.get_output("Matching Data") - output_sum.assert_called_with(len(output), - format_summary_details(output)) - - self.enterFilter(data.domain["iris"], "is", "Iris-setosa") - output = self.get_output("Matching Data") - output_sum.assert_called_with(len(output), - format_summary_details(output)) - input_sum.reset_mock() - output_sum.reset_mock() - self.send_signal(self.widget.Inputs.data, None) - input_sum.assert_called_once() - self.assertIsInstance(input_sum.call_args[0][0], StateInfo.Empty) - output_sum.assert_called_once() - self.assertIsInstance(output_sum.call_args[0][0], StateInfo.Empty) - def test_output_filter(self): """ None on output when there is no data. diff --git a/Orange/widgets/data/tests/test_owtranspose.py b/Orange/widgets/data/tests/test_owtranspose.py index 34aba15347a..02c358d1996 100644 --- a/Orange/widgets/data/tests/test_owtranspose.py +++ b/Orange/widgets/data/tests/test_owtranspose.py @@ -174,25 +174,6 @@ def test_unconditional_commit_on_new_signal(self): self.send_signal(self.widget.Inputs.data, self.zoo) apply.assert_called() - def test_summary(self): - """Check if status bar is updated when data is received""" - input_sum = self.widget.info.set_input_summary = Mock() - output_sum = self.widget.info.set_output_summary = Mock() - - data = Table("iris") - self.send_signal(self.widget.Inputs.data, data) - input_sum.assert_called_with(len(data), format_summary_details(data)) - output = self.get_output(self.widget.Outputs.data) - output_sum.assert_called_with(len(output), - format_summary_details(output)) - - input_sum.reset_mock() - output_sum.reset_mock() - self.send_signal(self.widget.Inputs.data, None) - input_sum.assert_called_once() - self.assertIsInstance(input_sum.call_args[0][0], StateInfo.Empty) - output_sum.assert_called_once() - self.assertIsInstance(output_sum.call_args[0][0], StateInfo.Empty) if __name__ == "__main__": unittest.main()