diff --git a/Orange/widgets/unsupervised/tests/test_owhierarchicalclustering.py b/Orange/widgets/unsupervised/tests/test_owhierarchicalclustering.py index 2a326031ac1..d9955c7f5b5 100644 --- a/Orange/widgets/unsupervised/tests/test_owhierarchicalclustering.py +++ b/Orange/widgets/unsupervised/tests/test_owhierarchicalclustering.py @@ -147,3 +147,12 @@ def test_output_cut_ratio(self): def _mouse_button_press_event(self): return QMouseEvent(QEvent.MouseButtonPress, QPoint(100, 10), Qt.LeftButton, Qt.LeftButton, Qt.NoModifier) + + def test_retain_selection(self): + """Hierarchical Clustering didn't retain selection. GH-1563""" + self.send_signal(self.widget.Inputs.distances, self.distances) + self._select_data() + self.assertIsNotNone(self.get_output(self.widget.Outputs.selected_data)) + self.send_signal(self.widget.Inputs.distances, self.distances) + self.assertIsNotNone(self.get_output(self.widget.Outputs.selected_data)) +