source: orange/Orange/testing/unit/tests/test_distance.py @ 10651:4f6fcf57db06

Revision 10651:4f6fcf57db06, 1.2 KB checked in by markotoplak, 2 years ago (diff)

Moved caching, collections, debugging, fileutil, r, testing from misc to utils.

Line 
1try:
2    import unittest2 as unittest
3except:
4    import unittest
5from Orange.utils import testing
6from Orange.utils.testing import datasets_driven, test_on_data
7
8from Orange.distance import *
9
10@datasets_driven
11class TestEuclideanDistance(testing.DistanceTestCase):
12    DISTANCE_CONSTRUCTOR = Euclidean()
13
14@datasets_driven
15class TestMannhatanDistance(testing.DistanceTestCase):
16    DISTANCE_CONSTRUCTOR = Manhattan()
17
18@datasets_driven
19class TestHammingDistance(testing.DistanceTestCase):
20    DISTANCE_CONSTRUCTOR = Hamming()
21
22@datasets_driven
23class TestReliefDistance(testing.DistanceTestCase):
24    DISTANCE_CONSTRUCTOR = Relief()
25
26@datasets_driven
27class TestPearsonRDistance(testing.DistanceTestCase):
28    DISTANCE_CONSTRUCTOR = PearsonR()
29
30@datasets_driven
31class TestSpearmanRDistance(testing.DistanceTestCase):
32    DISTANCE_CONSTRUCTOR = SpearmanR()
33
34@datasets_driven
35class TestPearsonRAbsoluteDistance(testing.DistanceTestCase):
36    DISTANCE_CONSTRUCTOR = PearsonRAbsolute()
37
38@datasets_driven
39class TestSpearmanRAbsoluteDistance(testing.DistanceTestCase):
40    DISTANCE_CONSTRUCTOR = SpearmanRAbsolute()
41
42@datasets_driven
43class TestMahalanobisDistance(testing.DistanceTestCase):
44    DISTANCE_CONSTRUCTOR = Mahalanobis()
45
46if __name__ == "__main__":
47    unittest.main()
Note: See TracBrowser for help on using the repository browser.