Skip to content

Commit 8da3ca7

Browse files
committed
geotiff: importorskip tifffile in #1949 round-trip test
tifffile is not a runtime dep, so the unconditional module-level import broke collection on CI where tifffile isn't installed. Switch to ``pytest.importorskip`` to skip the file gracefully instead, matching the pattern used by other geotiff tests (``test_miniswhite_nodata_1809``, ``test_predictor3_big_endian``). Also drop two unused stdlib imports.
1 parent b45422d commit 8da3ca7

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

xrspatial/geotiff/tests/test_no_georef_writer_round_trip_1949.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,14 @@
2020
from __future__ import annotations
2121

2222
import importlib.util
23-
import os
24-
import tempfile
2523

2624
import numpy as np
2725
import pytest
28-
import tifffile
2926
import xarray as xr
3027

31-
from xrspatial.geotiff import _coords_to_transform, open_geotiff, to_geotiff
28+
tifffile = pytest.importorskip("tifffile")
29+
30+
from xrspatial.geotiff import _coords_to_transform, open_geotiff, to_geotiff # noqa: E402
3231

3332

3433
def _gpu_available() -> bool:

0 commit comments

Comments
 (0)