source: orange/Orange/testing/unit/tests/test_tree.py @ 10319:52dbb52f9791

Revision 10319:52dbb52f9791, 724 bytes checked in by Ales Erjavec <ales.erjavec@…>, 2 years ago (diff)

Added max_depth=50 parameter to tree learners in test_tree.py (the pickling test can result in a max recursion error).

Line 
1from Orange.misc import testing
2from Orange.misc.testing import datasets_driven, test_on_data
3try:
4    import unittest2 as unittest
5except:
6    import unittest
7from Orange.classification import tree as ctree
8from Orange.regression import tree as rtree
9from Orange.feature import scoring
10# TODO: test different split_constructors, descenders, measures, stop criteria...
11
12@datasets_driven(datasets=testing.CLASSIFICATION_DATASETS)
13class TestClassification(testing.LearnerTestCase):
14    LEARNER = ctree.TreeLearner(max_depth=50)
15
16
17@datasets_driven(datasets=testing.REGRESSION_DATASETS)
18class TestRegression(testing.LearnerTestCase):
19    LEARNER = rtree.TreeLearner(max_depth=50)
20
21if __name__ == "__main__":
22    unittest.main()
Note: See TracBrowser for help on using the repository browser.