geotiff tests: consolidate parity tail cluster (Sub-PR B)#2462
Merged
Conversation
Fold eight top-level parity test files into three focused siblings next to parity/test_backend_matrix.py, grouped by concern: - parity/test_finalization.py: read-finalization parity (dispatch validation #2175, eager #2179, lazy #2178; epic #2162). - parity/test_signature_contract.py: signature / docstring / release- contract parity (#1631, #2274, #2389). - parity/test_reference.py: degenerate-shape backend parity and the rasterio / Zarr external-reference round trip (2026-05-11 sweep, #1961). backend_matrix.py is already 2090 lines; appending all eight files would push it past 4600. Three siblings keep each file well under the 2500-line guidance in the issue and group related tests together. GPU gating moves to the shared requires_gpu marker from _helpers/markers.py, replacing the per-file _gpu_available helpers. No assertion changed; the three files collect the same 137 tests as the eight source files. CLUSTER_AUDIT_PARITY.md maps every old file::test to its new file::test_id and is deleted in a final pre-merge commit per epic #2424. Tests-only -- no source changes.
Move the runtime GPU probe used by the lazy-finalization cross-backend assertions above its first call site so the helper reads in definition order. No behaviour change; the call-time resolution was already correct.
brendancol
commented
May 26, 2026
Contributor
Author
brendancol
left a comment
There was a problem hiding this comment.
PR Review: geotiff tests consolidate parity tail cluster (Sub-PR B)
Tests-only consolidation. I read all three new parity files in full and compared them against the eight deleted source files. No source changed, so the domain-specific checks (algorithm accuracy, backend dispatch, cuda kernels) do not apply. The review is about whether the consolidation keeps coverage intact and whether the two non-trivial edits (the repo-root path depth change and the cross-module import) are correct.
Blockers
None.
Suggestions
None.
Nits
parity/test_finalization.pydefined_gpu_dask_available()below its first call site. It resolved fine at call time, but reading in definition order is cleaner. Fixed in 441e0f1 by hoisting the helper above the lazy-section fixtures.
What looks good
- Test count preserved exactly: 137 collected before and after (81 + 25 + 31 across the three siblings).
- Splitting into three siblings rather than one large append keeps every file well under the issue's 2500-line ceiling. backend_matrix.py would have hit roughly 4600 lines if everything landed there.
- The load-bearing edit checks out:
test_signature_contract.pymoves_REPO_ROOTfromparents[3]toparents[4]because the file sits one directory deeper now. I verified the path resolves to the repo root and the release-contract section passes (25 passed). - The cross-module import
from ..read.test_crs import _write_rotated_tiffresolves and the lazy-finalization georef tests pass. - GPU gating moved to the shared
requires_gpumarker. The_BACKENDSparametrize marks and the inline conditional skips are both preserved via the runtime_gpu_dask_availableprobe. - No duplicate top-level defs or classes in any file; the whole parity dir collects together cleanly (618 tests).
- isort and flake8 clean.
Checklist
- Test count preserved (137 -> 137)
- Repo-root path depth corrected for the new location
- Cross-module import resolves
- GPU gating preserved (requires_gpu + runtime probe)
- No dropped or duplicated tests; audit maps every old test
- Imports resolve; lint clean
- [n/a] Algorithm / cuda correctness (no source changed)
- [n/a] README feature matrix (tests-only)
Epic #2424 HARD GATE: the per-cluster audit map lives on the branch during review and is removed in a final pre-merge commit.
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.
Closes #2431 (Sub-PR B of two). Cluster 7 of the long-tail GeoTIFF test consolidation epic (#2424). Tests-only.
Summary
Fold eight top-level parity files into three focused siblings next to
parity/test_backend_matrix.py, grouped by concern:parity/test_finalization.py-- read-finalization parity:test_dispatch_validation_parity_2162.pytest_eager_finalization_parity_2162.pytest_lazy_finalization_parity_2162.pyparity/test_signature_contract.py-- signature / docstring / release-contract parity:test_signature_parity_1631.pytest_read_entry_points_doc_param_parity_2274.pytest_release_contract_parity_2389.pyparity/test_reference.py-- degenerate-shape backend parity and external-reference round trips:test_degenerate_shapes_backends_2026_05_11.pytest_round_trip_parity_rasterio_zarr_1961.pybackend_matrix.pyis already 2090 lines; appending all eight files (~2578 lines) would push it past 4600. The issue allows a sibling once backend_matrix grows past 2500 lines. Three siblings keep each file well under that ceiling and group related tests together. The two signature-flavoured files (#1631, #2274) land with the release-contract gate so the contract-style parity files share a home; no test is duplicated against Sub-PR A.GPU gating moves to the shared
requires_gpumarker from_helpers/markers.py. The release-contract repo-root path moves fromparents[3]toparents[4]to track the new directory depth. No assertion changed.Audit
xrspatial/geotiff/tests/CLUSTER_AUDIT_PARITY.mdmaps every oldfile::testto its newfile::test_id. The audit file is deleted in a final pre-merge commit.Verification
pytest xrspatial/geotiff/tests/parity/test_finalization.py xrspatial/geotiff/tests/parity/test_signature_contract.py xrspatial/geotiff/tests/parity/test_reference.py -q: 137 passed (same total as the eight source files).pytest xrspatial/geotiff/tests/parity/ -q: 575 passed, 43 skipped.pytest xrspatial/geotiff/tests/ --co -q: 5891 tests collected, no errors.Test plan
parity/files pass on this checkout (GPU present).xrspatial/geotiff/tests/suite collects.