Skip to content

Commit 042e0fb

Browse files
committed
Add a test of complex polygon ldjson file input to estimate-area
1 parent e5ef0f8 commit 042e0fb

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

tests/fixtures/twostates.ldgeojson

Lines changed: 2 additions & 0 deletions
Large diffs are not rendered by default.

tests/test_cli_estimate_area.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,17 @@ def test_cli_estimate_area_valid_features_files_and_valid_feature_input():
102102
assert validated_result.output == output
103103

104104

105+
def test_cli_estimate_area_large_valid_features_files_and_valid_feature_input():
106+
output = '{"km2": "1390828", "precision": "10m", "pricing_docs": "For more information, visit https://www.mapbox.com/pricing/#tilesets"}\n'
107+
runner = CliRunner()
108+
validated_result = runner.invoke(
109+
estimate_area,
110+
["tests/fixtures/twostates.ldgeojson", "-p", "10m"],
111+
)
112+
assert validated_result.exit_code == 0
113+
assert validated_result.output == output
114+
115+
105116
def test_cli_estimate_area_valid_features_files_and_1cm_precision():
106117
output = '{"km2": "0", "precision": "1cm", "pricing_docs": "For more information, visit https://www.mapbox.com/pricing/#tilesets"}\n'
107118
runner = CliRunner()

0 commit comments

Comments
 (0)