Describe the bug
After #1697, read_vrt rejects any window outside the VRT extent with a ValueError (xrspatial/geotiff/_vrt.py:489-504). This matches the local-file path (read_to_array, #1634) and the HTTP path (_read_cog_http, #1669), so the cross-backend contract is consistent.
The test suite did not get updated to match. xrspatial/geotiff/tests/test_kwarg_behaviour_2026_05_12_v2.py:463 (test_window_clamps_to_raster_bounds) and :480 (test_window_clamps_negative_offsets) still assert clamping behavior. These tests should either be failing in CI or have been quietly skipped.
Expected behavior
The reject-out-of-bounds contract from #1697 is the canonical one and matches the other backends. The two clamping tests should be replaced with pytest.raises(ValueError) tests that lock in the new contract.
Proposed fix
- Delete or rewrite
test_window_clamps_to_raster_bounds and test_window_clamps_negative_offsets to assert ValueError instead.
- Confirm CI passes locally to make sure no other tests carry the old assumption.
Describe the bug
After #1697,
read_vrtrejects any window outside the VRT extent with aValueError(xrspatial/geotiff/_vrt.py:489-504). This matches the local-file path (read_to_array, #1634) and the HTTP path (_read_cog_http, #1669), so the cross-backend contract is consistent.The test suite did not get updated to match.
xrspatial/geotiff/tests/test_kwarg_behaviour_2026_05_12_v2.py:463(test_window_clamps_to_raster_bounds) and:480(test_window_clamps_negative_offsets) still assert clamping behavior. These tests should either be failing in CI or have been quietly skipped.Expected behavior
The reject-out-of-bounds contract from #1697 is the canonical one and matches the other backends. The two clamping tests should be replaced with
pytest.raises(ValueError)tests that lock in the new contract.Proposed fix
test_window_clamps_to_raster_boundsandtest_window_clamps_negative_offsetsto assertValueErrorinstead.