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

Revision 10655:a228b55811a4, 701 bytes checked in by markotoplak, 2 years ago (diff)

Moved testing from utils into testing.

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