def test_precise_value(self): points = np.random.random((68, 2)) points[0] = [2, 3] points[1] = [5, 7] lf = LandmarkFace(points, np.zeros((12, 13))) assert lf.euclidean_distance(0, 1) == 5 assert lf.euclidean_distance(1, 0) == 5
def test_identical(self): lf = LandmarkFace(np.random.random((68, 2)), np.zeros((12, 13))) for lix in range(68): assert lf.euclidean_distance(lix, lix) == 0