source: orange/Orange/testing/unit/tests/test_som.py @ 9679:3879dea56188

Revision 9679:3879dea56188, 916 bytes checked in by Miha Stajdohar <miha.stajdohar@…>, 2 years ago (diff)

Moved and renamed testing.

Line 
1from Orange.misc import testing
2from Orange.misc.testing import datasets_driven, test_on_data
3import unittest
4
5from Orange.projection import som
6
7def test_som_projection_helper(self, map, data):
8    pass
9
10@datasets_driven
11class TestSOM(testing.LearnerTestCase):
12    def setUp(self):
13        self.learner = som.SOMLearner
14       
15    @test_on_data
16    def test_learner_on(self, dataset):
17        if dataset.domain.class_var:
18            # Test the learner/classification interface
19            testing.LearnerTestCase.test_learner_on(self, dataset)
20        else:
21            self.classifier = self.learner(dataset)
22        test_som_projection_helper(self, self.classifier, dataset)
23       
24    @test_on_data
25    def test_pickling_on(self, dataset):
26        if dataset.domain.class_var:
27            testing.LearnerTestCase.test_pickling_on(self, dataset)
28   
29
30       
31if __name__ == "__main__":
32    unittest.main()
Note: See TracBrowser for help on using the repository browser.