Skip to content

Commit 07af1d2

Browse files
test_job_splitting: add a large area test #883
1 parent 881517e commit 07af1d2

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/extra/job_management/test_job_splitting.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def test_constructor_rejects_non_positive_size(self, size):
3333
"""Tile size must be strictly positive."""
3434
with pytest.raises(JobSplittingFailure, match="Tile size must be positive"):
3535
_SizeBasedTileGrid(epsg=4326, size=size)
36+
3637
def test_get_tiles_raises_exception(self):
3738
"""get_tiles rejects input that is not a dict, Polygon, or MultiPolygon."""
3839
tile_grid = _SizeBasedTileGrid(epsg=4326, size=0.1)
@@ -305,6 +306,12 @@ def test_split_area_3857(self):
305306
assert result.geometry[0].equals(shapely.geometry.box(0.0, 0.0, 20_000.0, 20_000.0))
306307
assert result.crs.to_epsg() == 3857
307308

309+
def test_split_large_area(self):
310+
aoi = {"west": 3.36, "south": 50.75, "east": 7.23, "north": 53.56, "crs": 4326}
311+
result = split_area(aoi, projection="EPSG:3857", tile_size=20_000.0)
312+
assert len(result) == 572
313+
assert result.crs.to_epsg() == 3857
314+
308315
def test_invalid_aoi_type_raises(self):
309316
"""split_area rejects AOI types that are not dict, Polygon, or MultiPolygon."""
310317
with pytest.raises(JobSplittingFailure, match="Expected a bounding-box dict"):

0 commit comments

Comments
 (0)