diff --git a/Orange/widgets/data/owfeaturestatistics.py b/Orange/widgets/data/owfeaturestatistics.py index 45ef0e55588..bc79cbde168 100644 --- a/Orange/widgets/data/owfeaturestatistics.py +++ b/Orange/widgets/data/owfeaturestatistics.py @@ -900,9 +900,9 @@ def set_info(self): self.info_meta.setText('') def on_select(self): - self.selected_rows = self.model.mapToSourceRows([ + self.selected_rows = list(self.model.mapToSourceRows([ i.row() for i in self.table_view.selectionModel().selectedRows() - ]) + ])) self.commit() def commit(self): diff --git a/Orange/widgets/data/tests/test_owfeaturestatistics.py b/Orange/widgets/data/tests/test_owfeaturestatistics.py index f737f6fd946..c141f9c4b77 100644 --- a/Orange/widgets/data/tests/test_owfeaturestatistics.py +++ b/Orange/widgets/data/tests/test_owfeaturestatistics.py @@ -1,4 +1,5 @@ import datetime +import unittest from collections import namedtuple from functools import partial from itertools import chain @@ -461,3 +462,7 @@ def test_restores_previous_selection(self): # Sending back the old data restores the selection self.send_signal(self.widget.Inputs.data, self.data1) self.assertEqual(len(self.widget.selected_rows), 2) + + +if __name__ == "__main__": + unittest.main()