Skip to content

Commit

Permalink
Added test and changed to reflect new Error name
Browse files Browse the repository at this point in the history
  • Loading branch information
rokgomiscek committed Jan 24, 2020
1 parent 0d348df commit 7974c3c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Orange/widgets/unsupervised/tests/test_owtsne.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,15 @@ def test_wrong_input(self):
self.send_signal(self.widget.Inputs.data, self.data)
self.wait_until_stop_blocking()
self.assertIsNone(self.widget.data)
self.assertTrue(self.widget.Error.no_attributes.is_shown())
self.assertTrue(self.widget.Error.not_enough_cols.is_shown())

# one attributes
self.data = Table.from_list(self.empty_domain, [[1, 'STG1'],
[2, 'STG1']])
self.send_signal(self.widget.Inputs.data, self.data)
self.wait_until_stop_blocking()
self.assertIsNone(self.widget.data)
self.assertTrue(self.widget.Error.not_enough_cols.is_shown())

# constant data
self.data = Table.from_list(self.domain, [[1, 2, 3, 4, 5, 'STG1']] * 2)
Expand All @@ -103,7 +111,7 @@ def test_wrong_input(self):
self.wait_until_stop_blocking()
self.assertIsNotNone(self.widget.data)
self.assertFalse(self.widget.Error.not_enough_rows.is_shown())
self.assertFalse(self.widget.Error.no_attributes.is_shown())
self.assertFalse(self.widget.Error.not_enough_cols.is_shown())
self.assertFalse(self.widget.Error.constant_data.is_shown())

def test_input(self):
Expand Down

0 comments on commit 7974c3c

Please sign in to comment.