def test_from_points_valid_neg(full_bbox_points: List[Point], neg_point: Point, full_bbox: BoundingBox) -> None: points = full_bbox_points + [neg_point] bbox = BoundingBox.from_points(points) expected_bbox = replace(full_bbox, x_min=-10.0, y_min=-10.0) assert (not bbox.is_empty()) assert (bbox == expected_bbox)
def test_from_single_point_empty(full_bbox_points: List[Point]) -> None: for point in full_bbox_points: bbox = BoundingBox.from_points([point]) assert (bbox.is_empty())
def test_from_points_valid(full_bbox_points: List[Point], full_bbox: BoundingBox) -> None: bbox = BoundingBox.from_points(full_bbox_points) assert (not bbox.is_empty()) assert (bbox == full_bbox)