geotiff tests: consolidate nodata write-side cluster (Sub-PR B)#2470
Merged
Conversation
Cluster 10 of long-tail epic #2424. Fold 5 write-side nodata files into a new ``xrspatial/geotiff/tests/write/test_nodata.py``: - ``test_nodata_validation_1973.py`` (non-numeric / bool rejection) - ``test_nodata_bool_rejection_1911.py`` (bool rejection at writer + ``build_geo_tags``) - ``test_nodata_int64_precision_1847.py`` (full-precision 64-bit integer sentinels via ``_parse_nodata_str``; eager / dask / VRT / GPU round-trip) - ``test_nodata_out_of_range_1581.py`` (out-of-range int sentinel is a value-match no-op rather than OverflowError) - ``test_mask_nodata_kwarg_2052.py`` (``mask_nodata=False`` keeps source integer dtype so the ``dtype=`` cast contract is reachable) Tests-only. The shared ``requires_gpu`` marker from ``_helpers/markers.py`` replaces the per-file ``_gpu_available`` / ``_gpu_only`` helpers. 87 tests collected, matching the baseline sum. Refs #2434.
brendancol
commented
May 27, 2026
Contributor
Author
brendancol
left a comment
There was a problem hiding this comment.
PR Review: nodata write-side consolidation (Sub-PR B)
Tests-only. Five source files folded into a new write/test_nodata.py. Bodies preserved verbatim.
Blockers: none.
Suggestions: none.
Nits: the file already has # === banners at the top of each of the five sections; the parametrised groups inside each section could carry one-line subheaders for skim-readability, but it is fine as-is.
Verified locally
- 87 tests collected and pass. Matches the baseline sum (27 + 17 + 25 + 8 + 10).
- No duplicate test IDs.
- One shared
requires_gpumarker replaces five per-file cupy probes. - Release-gate checklist-parity passes; the rst row adds
write/test_nodata.pyalongside the still-present read-side files. - flake8 clean.
Independent of #2469 (the read-side companion). Either merge order works.
# Conflicts: # docs/source/reference/release_gate_geotiff.rst
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 part of #2434 (Sub-PR B). Cluster 10 of long-tail epic #2424.
Summary
Fold 5 write-side nodata files into a new
xrspatial/geotiff/tests/write/test_nodata.py:test_nodata_validation_1973.py(non-numeric / bool rejection at every writer entry point)test_nodata_bool_rejection_1911.py(bool rejection atto_geotiff+build_geo_tags)test_nodata_int64_precision_1847.py(full-precision 64-bit integer sentinels via_parse_nodata_str; eager / dask / VRT / GPU round-trip)test_nodata_out_of_range_1581.py(out-of-range integer sentinel is a value-match no-op rather thanOverflowError)test_mask_nodata_kwarg_2052.py(mask_nodata=Falsekeeps the source integer dtype so thedtype=cast contract is reachable)Tests-only. The shared
requires_gpumarker from_helpers/markers.pyreplaces the per-file_gpu_available/_gpu_onlyhelpers. 87 tests collected, matching the baseline sum.The release-gate row for nodata round-trip and the geotiff.rst prose are updated to cite
write/test_nodata.pyalongside the existing read-side files.Verification
pytest xrspatial/geotiff/tests/write/test_nodata.py: 87 passed.pytest xrspatial/geotiff/tests/release_gates/test_stable_features.py::test_release_gate_cites_only_existing_test_files: 1 passed.Test plan
write/test_nodata.pypasses on this checkout.Companion PR
The read-side companion (Sub-PR A) is #2469. The two are independent; merging in either order works.