source: orange/Orange/testing/unit/tests/test_stepwise_wrapper.py @ 9962:bb2a2bb16104

Revision 9962:bb2a2bb16104, 655 bytes checked in by ales_erjavec, 2 years ago (diff)

Added test for StepwiseLearner wrapper.

Line 
1import unittest
2
3import Orange
4from Orange.misc import testing
5
6from Orange.classification import bayes
7from Orange.classification import wrappers
8
9
10@testing.datasets_driven(datasets=["iris", "lenses"])
11class TestStepwise(testing.LearnerTestCase):
12    LEARNER = wrappers.StepwiseLearner(learner=bayes.NaiveLearner())
13    @testing.test_on_data
14    def test_learner_on(self, dataset):
15        if len(dataset) > 100:
16            dataset = dataset.select(
17                Orange.data.sample.SubsetIndices2(n=100)(dataset)
18                )
19        testing.LearnerTestCase.test_learner_on(self, dataset)
20       
21if __name__ == "__main__":
22    unittest.main()
Note: See TracBrowser for help on using the repository browser.