def test_rotations(contours_pair: Tuple[Contour, Contour]) -> None: left, right = contours_pair result = contour_in_contour(left, right) assert all(result is contour_in_contour(rotated, right) for rotated in contour_rotations(left)) assert all(result is contour_in_contour(left, rotated) for rotated in contour_rotations(right))
def test_rotations(region_with_contour: Tuple[Region, Contour]) -> None: region, contour = region_with_contour result = contour_in_region(contour, region) assert all(result is contour_in_region(rotated, region) for rotated in contour_rotations(contour)) assert all(result is contour_in_region(contour, rotated) for rotated in contour_rotations(region))
def test_rotations(polygon_with_contour: Tuple[Polygon, Contour]) -> None: polygon, contour = polygon_with_contour result = contour_in_polygon(contour, polygon) assert all(result is contour_in_polygon(rotated, polygon) for rotated in contour_rotations(contour))
def test_rotations(contour_with_segment: Tuple[Contour, Segment]) -> None: contour, segment = contour_with_segment result = segment_in_contour(segment, contour) assert all(result is segment_in_contour(segment, rotated) for rotated in contour_rotations(contour))
def test_rotations(contour_with_point: Tuple[Contour, Point]) -> None: contour, point = contour_with_point result = point_in_contour(point, contour) assert all(result is point_in_contour(point, rotated) for rotated in contour_rotations(contour))
def test_rotations( contour_with_multisegment: Tuple[Contour, Multisegment]) -> None: contour, multisegment = contour_with_multisegment result = multisegment_in_contour(multisegment, contour) assert all(result is multisegment_in_contour(multisegment, rotated) for rotated in contour_rotations(contour)) assert all(result is multisegment_in_contour(rotated, contour) for rotated in multisegment_rotations(multisegment))