Accept VRTUnsupportedError in resample-alg rejection test#2378
Merged
Conversation
The centralised VRT capability validator (#2329, merged via #2376) raises VRTUnsupportedError at parse time before the legacy NotImplementedError site at the resample call. The parametrised test_unsupported_resample_alg_raises was still asserting only NotImplementedError, so it started failing on main once both PRs landed. Broaden the expected exception type to (NotImplementedError, ValueError) so the test passes whichever rejection path fires first. VRTUnsupportedError subclasses ValueError, and the algorithm-name assertion still locks the actionable-message contract. Matches the dual-type rejection already documented in the sister test_unsupported_resample_alg_open_geotiff.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test_unsupported_resample_alg_raises(added in VRT tests: negative coverage for unsupported features (#2370) #2375) asserts onlyNotImplementedError, but the centralised VRT capability validator (added in Centralise VRT capability validator at both read entry points (#2371) #2376 / issue GeoTIFF: centralize VRT capability validation (#2321 sub-task 2) #2329) now raisesVRTUnsupportedErrorat parse time before the legacyNotImplementedErrorsite at the resample call.Bilinear,Cubic,Lanczos,Average,Mode) started failing -- visible on the macOS-3.14 lane of Make corpus determinism check toolchain-agnostic (#2299) #2377's CI.(NotImplementedError, ValueError).VRTUnsupportedErrorsubclassesValueError, so either rejection path satisfies the test. The algorithm-name assertion still locks the actionable-message contract.test_unsupported_resample_alg_open_geotiff.Test plan
pytest xrspatial/geotiff/tests/test_vrt_unsupported_2370.py-- 15 passed, 2 xfailed (pre-existing PR1 dependency markers).