Ignore:
Timestamp:
02/06/12 13:52:55 (2 years ago)
Author:
markotoplak
Branch:
default
Children:
9725:6c16952df555, 9752:cbd6f6f10f06
rebase_source:
be8730bf9f2e7e771332dfc8b3876c8a62826bd1
Message:

Renames in Orange.distance.

File:
1 edited

Legend:

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

    r9679 r9724  
    44from Orange.misc.testing import datasets_driven, test_on_data 
    55from Orange.classification import knn 
    6 from Orange.distance.instances import EuclideanConstructor 
     6from Orange.distance import Euclidean 
    77 
    88 
     
    1111class TestKNNLearner(testing.LearnerTestCase): 
    1212    def setUp(self): 
    13         self.learner = knn.kNNLearner(distance_constructor=EuclideanConstructor()) 
     13        self.learner = knn.kNNLearner(distance_constructor=Euclidean()) 
    1414     
    1515    @testing.test_on_data 
    1616    def test_learner_on(self, dataset): 
    1717        testing.LearnerTestCase.test_learner_on(self, dataset) 
    18         instance = dataset.randomexample() 
     18        instance = dataset.random_instance() 
    1919        self.assertEqual(len(self.classifier.find_nearest(3, instance)), 3) 
    2020         
Note: See TracChangeset for help on using the changeset viewer.