Ignore:
Timestamp:
03/27/12 12:47:21 (2 years ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Added doctests to the svm test suite.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/testing/unit/tests/test_svm.py

    r10641 r10664  
    5151        sample = data.select(indices(data), 0) 
    5252         
    53         learner = copy.copy(self.LEARNER) 
     53        learner = copy.copy(self.learner) 
    5454        learner.probability = False  
    5555        classifier_no_prob = learner(data) 
     
    6868            self.assertEqual(prediction_1, prediciton_2) 
    6969             
    70  
    7170datasets = testing.CLASSIFICATION_DATASETS + testing.REGRESSION_DATASETS 
    7271@datasets_driven(datasets=datasets) 
     
    139138        testing.LearnerTestCase.test_learner_on(self, dataset) 
    140139        svm_test_binary_classifier(self, dataset) 
    141          
    142          
     140 
    143141@datasets_driven(datasets=datasets) 
    144142class SigmoidSVMTestCase(testing.LearnerTestCase): 
     
    149147        testing.LearnerTestCase.test_learner_on(self, dataset) 
    150148        svm_test_binary_classifier(self, dataset) 
    151          
    152149 
    153150 
     
    170167        svm_test_binary_classifier(self, dataset) 
    171168 
    172   
     169 
    173170@datasets_driven(datasets=datasets) 
    174171class CustomWrapperSVMTestCase(testing.LearnerTestCase): 
     
    189186        svm_test_binary_classifier(self, data) 
    190187 
    191  
    192188@datasets_driven(datasets=testing.CLASSIFICATION_DATASETS) 
    193189class TestLinLearner(testing.LearnerTestCase): 
     
    217213        copy = cPickle.loads(cPickle.dumps(rfe)) 
    218214 
     215def load_tests(loader, tests, ignore): 
     216    import doctest 
     217    tests.addTests(doctest.DocTestSuite(svm, **svm._doctest_args())) 
     218    return tests 
    219219 
    220220if __name__ == "__main__": 
Note: See TracChangeset for help on using the changeset viewer.