Skip to content

Commit

Permalink
Merge pull request #4400 from AndrejaKovacic/venn
Browse files Browse the repository at this point in the history
[FIX] Venn Diagram is slow for big datasets
  • Loading branch information
janezd authored Feb 20, 2020
2 parents 18e170f + eb00fd2 commit 9541a29
Show file tree
Hide file tree
Showing 3 changed files with 469 additions and 784 deletions.
9 changes: 6 additions & 3 deletions Orange/widgets/tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,9 +488,10 @@ class WidgetOutputsTestMixin:
_compare_selected_annotated_domains.
"""

def init(self):
def init(self, same_table_attributes=True):
self.data = Table("iris")
self.same_input_output_domain = True
self.same_table_attributes = same_table_attributes

def test_outputs(self, timeout=DEFAULT_TIMEOUT):
self.send_signal(self.signal_name, self.signal_data)
Expand All @@ -516,12 +517,14 @@ def test_outputs(self, timeout=DEFAULT_TIMEOUT):
self.same_input_output_domain)
np.testing.assert_array_equal(selected.X[:, :n_attr],
self.data.X[selected_indices])
self.assertEqual(selected.attributes, self.data.attributes)
if self.same_table_attributes:
self.assertEqual(selected.attributes, self.data.attributes)

# check annotated data output
annotated = self.get_output(ANNOTATED_DATA_SIGNAL_NAME)
self.assertEqual(n_sel, np.sum([i[feature_name] for i in annotated]))
self.assertEqual(annotated.attributes, self.data.attributes)
if self.same_table_attributes:
self.assertEqual(annotated.attributes, self.data.attributes)

# compare selected and annotated data domains
self._compare_selected_annotated_domains(selected, annotated)
Expand Down
Loading

0 comments on commit 9541a29

Please sign in to comment.