source: orange/testing/unittests/tests/test_rules.py @ 8763:215fb7c76033

Revision 8763:215fb7c76033, 1.1 KB checked in by ales_erjavec <ales.erjavec@…>, 3 years ago (diff)

Added more tests.

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