Skip to content

fix(python/sedonadb): skip RS_ReprojectMatch null-raster test without rasterio - #1096

Merged
paleolimbot merged 1 commit into
apache:mainfrom
jiayuasu:fix/rasterio-importorskip-reprojectmatch
Jul 29, 2026
Merged

fix(python/sedonadb): skip RS_ReprojectMatch null-raster test without rasterio#1096
paleolimbot merged 1 commit into
apache:mainfrom
jiayuasu:fix/rasterio-importorskip-reprojectmatch

Conversation

@jiayuasu

Copy link
Copy Markdown
Member

test_reproject_match_null_raster_is_null calls write_grid_geotiff, which imports rasterio, but is missing the pytest.importorskip("rasterio") guard that the other rasterio-dependent tests in the same file already have (see test_reproject_match_int64_uint64_rejected and test_reproject_match_sql_smoke). It therefore fails with ModuleNotFoundError in any environment without rasterio, rather than skipping like its neighbours.

This is currently breaking the wheel builds. CIBW_TEST_REQUIRES installs pytest adbc_driver_manager geoarrow-pyarrow geopandas duckdb — no rasterio — so python-wheels runs fail on this one test:

tests/functions/test_rs_reprojectmatch.py::test_reproject_match_null_raster_is_null FAILED
================ 1 failed, 3143 passed, 2495 skipped in 25.01s =================
>       import rasterio
E       ModuleNotFoundError: No module named 'rasterio'

Every python-wheels run on main has failed this way for several days, across linux-arm64, linux-x86_64, macOS-arm64, macOS-amd64, and windows-x86_64, which also skips the expr, zarr, and nightly-upload jobs.

Change

One line, matching the convention used elsewhere in this file and in the other test_rs_*.py modules:

pytest.importorskip("rasterio")  # write_grid_geotiff needs rasterio

Verification

Reproduced locally in an environment without rasterio: the test failed before the change, and afterwards the module reports 13 skipped, 0 failed. ruff format and ruff check are clean.

Note

The alternative would be adding rasterio to CIBW_TEST_REQUIRES so these tests actually run during wheel builds. Worth considering separately: 12 of the 13 tests in this module already skip in that environment, so raster coverage there is currently minimal. That is a coverage decision rather than a fix for the broken build, so this PR only restores the skip behaviour the module already intends.

@paleolimbot paleolimbot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@paleolimbot
paleolimbot merged commit e7bae22 into apache:main Jul 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants