source: orange/Orange/testing/unit/tests/test_c45.py @ 10278:f3b1ffae9c29

Revision 10278:f3b1ffae9c29, 826 bytes checked in by Miha Stajdohar <miha.stajdohar@…>, 2 years ago (diff)

Unittest2 for python 2.6.

Line 
1from Orange.misc import testing
2try:
3    import unittest2 as unittest
4except:
5    import unittest
6import orange
7
8@testing.datasets_driven(datasets=testing.CLASSIFICATION_DATASETS)
9class TestC45(testing.LearnerTestCase):
10    def setUp(self):
11        self.learner = orange.C45Learner
12
13    @testing.test_on_data
14    def test_learner_on(self, dataset):
15        try:
16            orange.C45Learner()
17        except orange.KernelException:
18            raise unittest.SkipTest("C45 dll not found")
19        testing.LearnerTestCase.test_learner_on(self, dataset)
20
21    @testing.test_on_data
22    def test_pickling_on(self, dataset):
23        try:
24            orange.C45Learner()
25        except orange.KernelException:
26            raise unittest.SkipTest("C45 dll not found")
27        testing.LearnerTestCase.test_pickling_on(self, dataset)
Note: See TracBrowser for help on using the repository browser.