def test_triangle_angle_abc(point1, point2, point3, expected_angle): """ Verify that the angle_abc function returns expected values """ triangle = decide.Triangle(decide.Point(point1), decide.Point(point2), decide.Point(point3)) assert triangle.angle_abc() == pytest.approx(expected_angle)
def test_triangle_circumradius(point1, point2, point3, expected_radius): """ Verify that the circumradius function returns expected values """ triangle = decide.Triangle(decide.Point(point1), decide.Point(point2), decide.Point(point3)) assert triangle.circumradius() == pytest.approx(expected_radius)
def test_distance(point1, point2, expected_distance): """ Verify that the distance function returns expected values """ assert decide.Point(point1).distance(decide.Point(point2)) == pytest.approx( expected_distance )
def test_triangle_area(point1, point2, point3, expected_area, message): """ Verify that the triangle_area function returns expected values """ triangle = decide.Triangle(decide.Point(point1), decide.Point(point2), decide.Point(point3)) assert triangle.area() == pytest.approx(expected_area), message
def test_quadrant(coordinates, expected_quadrant): """ Verify that the quadrant function returns expected values """ point = decide.Point(coordinates) assert point.quadrant() == expected_quadrant