def test_init_circle(self): circle = ConstructionCircle((0., 0.), 5) point = circle.point_at(HALF_PI) self.assertAlmostEqual(point[0], 0., 3) self.assertAlmostEqual(point[1], 5., 3) point = circle.point_at(HALF_PI / 2) self.assertAlmostEqual(point[0], 3.5355, 3) self.assertAlmostEqual(point[1], 3.5355, 3)
def test_init_circle(): circle = ConstructionCircle((0., 0.), 5) point = circle.point_at(HALF_PI) assert isclose(point[0], 0., abs_tol=1e-4) assert isclose(point[1], 5., abs_tol=1e-4) point = circle.point_at(HALF_PI / 2) assert isclose(point[0], 3.5355, abs_tol=1e-4) assert isclose(point[1], 3.5355, abs_tol=1e-4)