-
-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
r.buffer: Added test script #4482
Merged
Merged
Conversation
This file contains 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
github-actions
bot
added
raster
Related to raster data processing
Python
Related code is in Python
module
tests
Related to Test Suite
labels
Oct 9, 2024
petrasovaa
reviewed
Oct 10, 2024
petrasovaa
reviewed
Oct 10, 2024
petrasovaa
reviewed
Oct 10, 2024
petrasovaa
reviewed
Oct 10, 2024
petrasovaa
reviewed
Oct 23, 2024
petrasovaa
reviewed
Oct 23, 2024
petrasovaa
reviewed
Nov 5, 2024
Reduced the region of the test Co-authored-by: Anna Petrasova <[email protected]>
petrasovaa
requested changes
Nov 6, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment about output maps in #4598 and apply it here too.
petrasovaa
reviewed
Nov 6, 2024
petrasovaa
approved these changes
Nov 8, 2024
echoix
approved these changes
Nov 8, 2024
a0x8o
pushed a commit
to a0x8o/grass
that referenced
this pull request
Nov 11, 2024
* Added test script for r.buffer * Corrected input map and added tearDown method to delete temp maps * Added pre commit fixes * Added resolution for feedback * Tweaked the last test and used f string * Update raster/r.buffer/testsuite/test_buffer.py Reduced the region of the test Co-authored-by: Anna Petrasova <[email protected]> * Corrected redudancy * Streamlined output map initialization --------- Co-authored-by: Anna Petrasova <[email protected]>
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.
This PR adds regression tests for the
r.buffer
module to ensure its functionality remains intact with future code changes. The following test cases are covered:test_buffer_creation(): Verifies the creation of buffer zones around raster features based on specified distances. It checks that the output raster exists, has expected category values starting from 1, and that the minimum and maximum values match the expected range.
test_no_non_null_values(): Confirms that the
r.buffer
module correctly handles an input raster that is entirely null, ensuring the output contains no non-null values.test_ignore_zero_values(): Ensures that zero values in the input raster are ignored when creating buffer zones, resulting in an output that does not include any zero categories.