def test_get_relative_broader_interval_diag_2(self): point_1 = (0, 0) point_2 = (1, 1) point_1_new, point_2_new = picture_cross.get_broader_interval( point_1, point_2, .5) results = ((-.5, -.5), (1.5, 1.5)) for i, point in enumerate([point_1_new, point_2_new]): self.assertSequenceEqual(list(point), results[i])
def test_get_relative_broader_interval_y_reversed(self): point_1 = (0, 1) point_2 = (0, 0) point_1_new, point_2_new = picture_cross.get_broader_interval( point_1, point_2, 1) results = ((0., 2.), (0., -1.)) for i, point in enumerate([point_1_new, point_2_new]): self.assertSequenceEqual(list(point), results[i])
def test_get_relatie_broader_interval_basic(self): point_1 = (3.2, 1.5) point_2 = (-.5, 1.7) point_1_new, point_2_new = picture_cross.get_broader_interval( point_1, point_2, 1) results = ((6.9, 1.3), (-4.2, 1.9)) for i, point in enumerate([point_1_new, point_2_new]): self.assertSequenceEqual(list(point), results[i])