Changeset 10104:55e360ac0d14 in orange


Ignore:
Timestamp:
02/08/12 18:16:54 (2 years ago)
Author:
ales_erjavec
Branch:
default
rebase_source:
e15aef0f29de3c526d363ea990f15ef7c2f7a1ee
Message:

Added test for SOMSupervisedLearner.

File:
1 edited

Legend:

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

    r9679 r10104  
    2626        if dataset.domain.class_var: 
    2727            testing.LearnerTestCase.test_pickling_on(self, dataset) 
    28      
     28 
     29@datasets_driven(datasets=testing.CLASSIFICATION_DATASETS) 
     30class TestSOMSupervised(testing.LearnerTestCase): 
     31    def setUp(self): 
     32        self.learner = som.SOMSupervisedLearner() 
     33         
     34    @test_on_data 
     35    def test_learner_on(self, dataset): 
     36        if dataset.domain.class_var: 
     37            # Test the learner/classification interface 
     38            testing.LearnerTestCase.test_learner_on(self, dataset) 
     39        else: 
     40            self.classifier = self.learner(dataset) 
     41        test_som_projection_helper(self, self.classifier, dataset) 
     42         
     43    @test_on_data 
     44    def test_pickling_on(self, dataset): 
     45        if dataset.domain.class_var: 
     46            testing.LearnerTestCase.test_pickling_on(self, dataset) 
     47             
    2948 
    3049         
Note: See TracChangeset for help on using the changeset viewer.