source: orange/Orange/testing/unit/tests/test_rules.py @ 10655:a228b55811a4

Revision 10655:a228b55811a4, 1.1 KB checked in by markotoplak, 2 years ago (diff)

Moved testing from utils into testing.

Line 
1from Orange.testing import testing
2from Orange.classification import rules
3
4try:
5    import unittest2 as unittest
6except:
7    import unittest
8
9@testing.test_on_data
10def test_learner_on(self, dataset):
11    testing.LearnerTestCase.test_learner_on(self, dataset)
12    for r in self.classifier.rules:
13        str = rules.rule_to_string(r, True)
14
15@testing.datasets_driven(datasets=testing.CLASSIFICATION_DATASETS)
16class TestCN2Learner(testing.LearnerTestCase):
17    def setUp(self):
18        self.learner = rules.CN2Learner()
19
20    test_learner_on = test_learner_on
21
22@testing.datasets_driven(datasets=testing.CLASSIFICATION_DATASETS)
23class TestCN2UnorderedLearner(testing.LearnerTestCase):
24    def setUp(self):
25        self.learner = rules.CN2UnorderedLearner()
26
27    test_learner_on = test_learner_on
28
29#@testing.datasets_driven(datasets=testing.CLASSIFICATION_DATASETS)
30#class TestCN2SDUnorderedLearner(testing.LearnerTestCase):
31#    def setUp(self):
32#        self.learner = rules.CN2SDUnorderedLearner()
33#       
34#    test_learner_on = test_learner_on
35
36
37if __name__ == "__main__":
38    unittest.main()
Note: See TracBrowser for help on using the repository browser.