Skip to content

Commit

Permalink
OWLouvain: Add test for adding and removing data
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlin-policar committed Jul 31, 2018
1 parent 1e705f9 commit 86ce71b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Orange/widgets/unsupervised/tests/test_owlouvain.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,18 @@ def setUp(self):
self.widget = self.create_widget(
OWLouvainClustering, stored_settings={'auto_commit': False}
)
self.iris = Table('iris')

def tearDown(self):
self.widget.onDeleteWidget()
super().tearDown()

def test_removing_data(self):
self.send_signal(self.widget.Inputs.data, self.iris)
self.commit_and_wait()
self.send_signal(self.widget.Inputs.data, None)
self.commit_and_wait()

def test_clusters_ordered_by_size(self):
"""Cluster names should be sorted based on the number of instances."""
x1 = np.array([[0, 0]] * 20)
Expand Down

0 comments on commit 86ce71b

Please sign in to comment.