|
3 | 3 | import numpy as np |
4 | 4 |
|
5 | 5 | from Orange.data import DiscreteVariable, ContinuousVariable, Domain, Table |
6 | | -from Orange.preprocess import Preprocess, Normalize |
| 6 | +from Orange.preprocess import Normalize |
7 | 7 | from Orange.projection.manifold import TSNE |
8 | 8 | from Orange.widgets.tests.base import ( |
9 | 9 | WidgetTest, WidgetOutputsTestMixin, ProjectionWidgetTestMixin |
@@ -111,28 +111,6 @@ def test_attr_models(self): |
111 | 111 | self.assertNotIn(var, controls.attr_size.model()) |
112 | 112 | self.assertIn(var, controls.attr_shape.model()) |
113 | 113 |
|
114 | | - def test_output_preprocessor(self): |
115 | | - # To test the validity of the preprocessor, we'll have to actually |
116 | | - # compute the projections |
117 | | - self.restore_mocked_functions() |
118 | | - |
119 | | - self.send_signal(self.widget.Inputs.data, self.data) |
120 | | - self.wait_until_stop_blocking(wait=20000) |
121 | | - output_data = self.get_output(self.widget.Outputs.annotated_data) |
122 | | - |
123 | | - # We send the same data to the widget, we expect the point locations to |
124 | | - # be fairly close to their original ones |
125 | | - pp = self.get_output(self.widget.Outputs.preprocessor) |
126 | | - self.assertIsInstance(pp, Preprocess) |
127 | | - |
128 | | - transformed_data = pp(self.data) |
129 | | - self.assertIsInstance(transformed_data, Table) |
130 | | - self.assertEqual(transformed_data.X.shape, (len(self.data), 2)) |
131 | | - np.testing.assert_allclose(transformed_data.X, output_data.metas[:, :2], |
132 | | - rtol=1, atol=3) |
133 | | - self.assertEqual([a.name for a in transformed_data.domain.attributes], |
134 | | - [m.name for m in output_data.domain.metas[:2]]) |
135 | | - |
136 | 114 | def test_multiscale_changed(self): |
137 | 115 | self.assertFalse(self.widget.controls.multiscale.isChecked()) |
138 | 116 | self.assertTrue(self.widget.perplexity_spin.isEnabled()) |
|
0 commit comments