예제 #1
0
	def test_float_reverse(self):
		for test in self.float_test_values:
			a = nearest_neighbors.distance_in_mod(test[1], test[0], test[2])
			self.assertAlmostEqual(a, test[3])
예제 #2
0
	def test_float_sign(self):
		for test in self.float_test_values:
			a = nearest_neighbors.distance_in_mod(test[0], test[1], test[2])
			self.assertGreater(a, 0.0)
예제 #3
0
	def test_integer_reverse(self):
		for test in self.integer_test_values:
			a = nearest_neighbors.distance_in_mod(test[1], test[0], test[2])
			self.assertEqual(a, test[3])