Repository navigation
grass.temporal: Remove duplicate test and fix copy-pasted docstrings in granularity tests - #8045
Merged
Merged
Conversation
added 2 commits
October 10, 2026 15:52
The second definition of test_common_granularity_4 was an identical copy of the first. Python keeps only the last definition, so the first one never ran as a separate test. Remove the copy; the remaining test checks the same thing. The change was found and fixed with AI assistance.
echoix
force-pushed
the
fix/temporal-remove-duplicate-test
branch
from
October 10, 2026 19:52
5ccf47e to
06e64f9
Compare
ninsbl
approved these changes
Oct 10, 2026
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.
Description
unittests_temporal_algebra_grs.pydefinedtest_common_granularity_4twice with identical bodies. Python keeps only the last definition, so the first copy never ran as a separate test. This PR removes the duplicate copy. The remaining test checks the same assertions as before, so no test coverage is lost.The docstrings of
test_common_granularity_5andtest_common_granularity_6were copied fromtest_common_granularity_4("year to month with gaps") and did not describe what those tests do. They now describe the three-dataset expression and the conditional expression, respectively.Motivation and context
The duplicate was found by ruff's F811 (redefined-while-unused) check.
How has this been tested?
Compared the two bodies in the git history; they are identical, including the docstring. The docstring change does not affect behavior.
ruff checkandruff format --checkpass on the file.Types of changes
Checklist
This change was prepared with the help of Claude Code.