Skip to content

Commit eb66cf4

Browse files
authored
geotiff: skip degenerate streaming tests when tifffile is unavailable (#1926)
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.
1 parent b176169 commit eb66cf4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

xrspatial/geotiff/tests/test_dask_streaming_write_degenerate_2026_05_15.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def _read_raw_pixels(path: str) -> np.ndarray:
5959
correctly. ``tifffile`` decodes the pixels but does not consult
6060
``GDAL_NODATA``, so a raw read surfaces what is actually on disk.
6161
"""
62-
import tifffile
62+
tifffile = pytest.importorskip("tifffile")
6363

6464
with tifffile.TiffFile(path) as tif:
6565
return tif.asarray()

0 commit comments

Comments
 (0)