Changeset 10038:5759033b51bb in orange


Ignore:
Timestamp:
02/08/12 08:58:25 (2 years ago)
Author:
ales_erjavec
Branch:
default
rebase_source:
d81e0104a68acdbfbfa35c68c8dc0b1775528120
Message:

Fixed some unittests.

Location:
Orange/testing/unit/tests
Files:
3 edited

Legend:

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

    r9679 r10038  
    44import Orange 
    55import unittest 
    6  
    7 #@datasets_driven(datasets=["servo", "housing"]) # Dont test on auto-mpg - takes too long. Should  use a different continuizer.  
     6  
    87@datasets_driven(datasets=testing.REGRESSION_DATASETS) 
    98class TestLassoRegressionLearner(testing.LearnerTestCase): 
     
    1514    def test_learner_on(self, dataset): 
    1615        testing.LearnerTestCase.test_learner_on(self, dataset) 
    17         lasso.print_lasso_regression_model(self.classifier) 
    18          
     16        self.assertTrue(isinstance(self.classifier.to_string(), str)) 
    1917         
    2018if __name__ == "__main__": 
  • Orange/testing/unit/tests/test_linregression.py

    r9679 r10038  
    1414    def test_learner_on(self, dataset): 
    1515        testing.LearnerTestCase.test_learner_on(self, dataset) 
    16         linear.print_linear_regression_model(self.classifier) 
     16        self.assertTrue(isinstance(self.classifier.to_string(), str)) 
    1717         
    1818@datasets_driven(datasets=testing.REGRESSION_DATASETS) 
     
    2626        testing.LearnerTestCase.test_learner_on(self, dataset) 
    2727        if self.classifier.p_vals: 
    28             linear.print_linear_regression_model(self.classifier) 
     28            self.assertTrue(isinstance(self.classifier.to_string(), str)) 
    2929     
    3030         
  • Orange/testing/unit/tests/test_mds.py

    r9724 r10038  
    1111    @test_on_data 
    1212    def test_mds_on(self, data): 
    13         matrix = distance_matrix(data, EuclideanConstructor) 
     13        matrix = distance_matrix(data, Euclidean) 
    1414        self.__mds_test_helper(matrix, proj_dim=1) 
    1515        self.__mds_test_helper(matrix, proj_dim=2) 
Note: See TracChangeset for help on using the changeset viewer.