Skip to content

Commit

Permalink
Python: avoid test dependency on rasterio
Browse files Browse the repository at this point in the history
  • Loading branch information
dbaston committed Dec 7, 2023
1 parent 7ca1e0d commit 0a03ee8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/tests/test_raster_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ def global_half_degree(tmp_path):

@pytest.mark.parametrize("Source", (GDALRasterSource, RasterioRasterSource))
def test_gdal_raster(global_half_degree, Source):
src = Source(global_half_degree, 1)
try:
src = Source(global_half_degree, 1)
except ModuleNotFoundError as e:
pytest.skip(str(e))

assert src.res() == (0.50, 0.50)
assert src.extent() == pytest.approx((-180, -90, 180, 90))
Expand Down

0 comments on commit 0a03ee8

Please sign in to comment.