geotiff tests: consolidate overview cluster#2456
Merged
Merged
Conversation
Fold ten top-level overview test files into the write-side and read-side overview suites for cluster 8 of epic #2424. Write-side -> write/test_overview.py (extended): - test_overview_block_order_2308.py - test_overview_filter.py is read-side; see note below - test_overview_levels_decimation_factors_1766.py - test_overview_nodata_inheritance_1739.py - test_overview_pixel_is_point_1642.py - test_overview_resampling_min_max_median_2026_05_11.py - test_mode_overview_perf.py Read-side -> read/test_overview.py (new): - test_overview_filter.py - test_overview_geo_inheritance_1640.py - test_overview_level_type_validation_2074.py - test_overview_level_validation_backends_2160.py The two GPU overview files stay put; they belong to the GPU cluster (#2438). CLUSTER_AUDIT_OVERVIEW.md maps every old file::test to its new home and is deleted on a pre-merge commit. Tests-only. No source changes.
brendancol
commented
May 26, 2026
Contributor
Author
brendancol
left a comment
There was a problem hiding this comment.
PR Review: geotiff tests: consolidate overview cluster
Tests-only consolidation. I checked it as a behavior-preserving move rather than a logic change.
Blockers
None.
Suggestions
None.
Nits
write/test_overview.pykeeps several imports inside their sections (lines 1361, 1494-1495, 1820, 2100, 2592) with# noqa: E402rather than hoisting them to the module header. That is a defensible choice for an auditable move and the noqa is correct, but a follow-up could lift them to the top once the dust settles. Not worth churning the diff for now.
What looks good
- Test-count parity is exact: 102 test functions across the ten source files, 58 added to
write/test_overview.pyand 44 in the newread/test_overview.py, 102 total. No test dropped or duplicated. - Sample test bodies diff clean against the originals. The only deltas are the intended ones:
STEM->_STEM_1766and the colliding_write_cog_with_one_overview/cog_with_overviewpair namespaced per issue (_2074/_2160), plus a couple of imports moved local. Assertions are untouched. test_overview_filter.pylands on the read side next to the other IFD-selection coverage, which matches its actual call surface (select_overview_ifd,open_geotiff(overview_level=...)); the audit file records the divergence from the issue's tentative write-side listing.- The two GPU overview files are left in place for the GPU cluster (#2438), as scoped.
- Full suite green:
pytest xrspatial/geotiff/tests/ -x -q-> 5815 passed, 68 skipped, 2 xfailed. File count 244 -> 235.
Checklist
- No source changes; behavior preserved
- All backends still parametrized (numpy / dask+numpy / cupy / dask+cupy)
- NaN / sentinel handling tests carried over unchanged
- Edge cases (odd shapes, 1x1, all-sentinel) carried over
- Temporary files uniquely named per section
- No duplicate test or fixture names within either target
- CI green across backends (pending)
- Audit file present; scheduled for deletion pre-merge
Per epic #2424, the per-cluster audit mapping is removed once the consolidation is in place.
The CI fast lane installs only `.[tests]`, which does not include tifffile. The consolidated read/test_overview.py used a bare `import tifffile` inside the IFD-builder helpers, so those tests raised ModuleNotFoundError instead of skipping. The original test_overview_filter.py guarded with pytest.importorskip; restore that behaviour by importing tifffile through importorskip in every helper that hand-builds a TIFF.
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 #2432. Cluster 8 of the long-tail GeoTIFF test consolidation epic (#2424).
Summary
Fold ten top-level overview files into the write-side and read-side overview suites. One PR, since the diff stays clean.
Write-side -> extended
xrspatial/geotiff/tests/write/test_overview.py:test_overview_block_order_2308.pytest_overview_levels_decimation_factors_1766.pytest_overview_nodata_inheritance_1739.pytest_overview_pixel_is_point_1642.pytest_overview_resampling_min_max_median_2026_05_11.pytest_mode_overview_perf.pyRead-side -> new
xrspatial/geotiff/tests/read/test_overview.py:test_overview_filter.pytest_overview_geo_inheritance_1640.pytest_overview_level_type_validation_2074.pytest_overview_level_validation_backends_2160.pyEach file becomes a
# Section:block in the target, matching the convention already used inwrite/test_overview.py. Module-level helpers that collided across files were renamed (e.g. the_write_cog_with_one_overview/cog_with_overviewpair from the 2074 and 2160 files are namespaced per issue). No test bodies or assertions changed.test_overview_filter.pyexercisesselect_overview_ifdandopen_geotiff(overview_level=...), so it lands on the read side next to the other IFD-selection coverage rather than in the write-side file the issue tentatively listed it under. The audit file records this.The two GPU overview files (
test_gpu_writer_overview_inplace_1948.py,test_gpu_writer_overview_mode_and_compression_level_1740.py) are left in place for the GPU cluster (#2438).Audit
xrspatial/geotiff/tests/CLUSTER_AUDIT_OVERVIEW.mdmaps every oldfile::testto its newfile::test. The audit file is deleted on a final commit on this branch before merge.Verification
pytest xrspatial/geotiff/tests/write/test_overview.py -q: 328 passed.pytest xrspatial/geotiff/tests/read/test_overview.py -q: 60 passed.pytest xrspatial/geotiff/tests/ -x -q: 5815 passed, 68 skipped, 2 xfailed.find xrspatial/geotiff/tests -name 'test_*.py' | wc -l: 235 (was 244; -10 deleted +1 added).Test plan
read/test_overview.pypasses on this checkout.write/test_overview.pypasses.xrspatial/geotiff/tests/suite passes.Tests-only -- no source changes.