From aa35a967af317c7e8cf628d8b151628b0c8a3564 Mon Sep 17 00:00:00 2001 From: Brendan Collins Date: Fri, 15 May 2026 07:20:52 -0700 Subject: [PATCH] geotiff: skip degenerate streaming tests when tifffile is unavailable The dask streaming degenerate-shape tests added in #1912 use a _read_raw_pixels helper that does a bare ``import tifffile`` to verify on-disk encoding. ``tifffile`` is an optional CI dependency, so when it is not installed the three tests that call this helper error out with ModuleNotFoundError instead of skipping. CI on main has been failing since 15882e6 landed. Other tests in the repo handle this with pytest.importorskip; this change applies the same pattern so the three tests skip cleanly when tifffile is missing. --- .../tests/test_dask_streaming_write_degenerate_2026_05_15.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xrspatial/geotiff/tests/test_dask_streaming_write_degenerate_2026_05_15.py b/xrspatial/geotiff/tests/test_dask_streaming_write_degenerate_2026_05_15.py index d3338665a..7fc2de57a 100644 --- a/xrspatial/geotiff/tests/test_dask_streaming_write_degenerate_2026_05_15.py +++ b/xrspatial/geotiff/tests/test_dask_streaming_write_degenerate_2026_05_15.py @@ -59,7 +59,7 @@ def _read_raw_pixels(path: str) -> np.ndarray: correctly. ``tifffile`` decodes the pixels but does not consult ``GDAL_NODATA``, so a raw read surfaces what is actually on disk. """ - import tifffile + tifffile = pytest.importorskip("tifffile") with tifffile.TiffFile(path) as tif: return tif.asarray()