Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Allow minor polygon differences #1087

Merged
merged 9 commits into from
Sep 27, 2024
3 changes: 2 additions & 1 deletion scripts/stac/imagery/tests/capture_area_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from decimal import Decimal
from sys import float_info
from typing import cast

from shapely import get_exterior_ring, is_ccw
Expand Down Expand Up @@ -71,7 +72,7 @@ def test_merge_polygons_with_rounding_margin_too_big() -> None:
print(f"GeoJSON expected: {to_feature(expected_merged_polygon)}")
print(f"GeoJSON result: {to_feature(merged_polygons)}")

assert merged_polygons.equals_exact(expected_merged_polygon, tolerance=0.0)
assert merged_polygons.equals_exact(expected_merged_polygon, tolerance=float_info.epsilon)


def test_generate_capture_area_rounded() -> None:
Expand Down
Loading