def test_dist(self): sol = (0.13 + 0.17 + 0.24) / (0.1 + 0.13 + 0.17 + 0.24 + 0.03) self.assertEqual(sol, calc_dist(self.vec1, self.vec3, self.dist))
def test_different(self): sol = 1.0 self.assertEqual(sol, calc_dist(self.vec1, self.vec2, self.dist))
def test_equal(self): sol = 0.0 self.assertEqual(sol, calc_dist(self.vec1, self.vec1, self.dist))