From 7974c3c8bd92ba18d4cc5d4acfbebbaeff1fdeb1 Mon Sep 17 00:00:00 2001 From: Rok Gomiscek Date: Fri, 24 Jan 2020 12:25:49 +0100 Subject: [PATCH] Added test and changed to reflect new Error name --- Orange/widgets/unsupervised/tests/test_owtsne.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Orange/widgets/unsupervised/tests/test_owtsne.py b/Orange/widgets/unsupervised/tests/test_owtsne.py index b268919a4ff..2cc5134fc74 100644 --- a/Orange/widgets/unsupervised/tests/test_owtsne.py +++ b/Orange/widgets/unsupervised/tests/test_owtsne.py @@ -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) @@ -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):