Add tests for all-NaN auto-levels RuntimeWarning regression (#2795)#3009
Open
Melissari1997 wants to merge 2 commits into
Open
Add tests for all-NaN auto-levels RuntimeWarning regression (#2795)#3009Melissari1997 wants to merge 2 commits into
Melissari1997 wants to merge 2 commits into
Conversation
Melissari1997
commented
Jun 7, 2026
Contributor
Author
Melissari1997
left a comment
There was a problem hiding this comment.
Review: Add tests for all-NaN auto-levels RuntimeWarning regression (#2795)
Summary
Test-only PR adding regression coverage for contours() on all-NaN rasters with auto level selection. The warning suppression was already implemented in commit 58a44c3; this PR ensures it does not regress.
Findings
No Blockers.
Suggestions:
- None.
Nits:
- The import warnings is repeated inside each test method. Consider moving it to the module-level imports at the top of the file to avoid redundancy across the four new tests.
Assessment
- Test structure follows existing patterns in TestNaNHandling
- Backend coverage is complete (numpy, dask+numpy, cupy, dask+cupy)
- All tests pass in the local environment
- PR correctly targets the upstream repo
Melissari1997
commented
Jun 7, 2026
Contributor
Author
Melissari1997
left a comment
There was a problem hiding this comment.
Follow-up review: Address review nit (#2795)
Moved import warnings to module-level imports. All four new tests now share the single module-level import. No functional changes.
Assessment
- Nit addressed
- Tests still pass
- Ready for merge
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 #2795.
contours()on all-NaN rasters with auto level selection, verifying no RuntimeWarning is emitted.The warning suppression was already in place (commit 58a44c3), but lacked explicit test coverage to prevent regression.
Backend coverage:
Test checklist: