r.watershed: Add comprehensive regression tests #7029
r.watershed: Add comprehensive regression tests #7029sumitchintanwar wants to merge 3 commits intoOSGeo:mainfrom
Conversation
wenzeslaus
left a comment
There was a problem hiding this comment.
The tests need to go far beyond testing existing of rasters. You need to compute the data and then test against them in the test. Check some other tests we have for other tools. Also, make sure your new tests don't overlap with existing tests. You may also expand existing test if appropriate.
Got it, I understand. That was my bad, should’ve thought about it earlier. I’m working on the changes and will push them soon. |
This PR adds a comprehensive suite of regression tests for the r.watershed module, which addresses the changes requested in PR #6953. The tests are designed to verify the consistency of output rasters, correct parameter handling (including memory and convergence settings), and the proper function of specific flags.
All tests were validated using the North Carolina sample dataset (nc_spm_08_grass7)
Results:
Before: 6 tests (2 errors)
After: 15 tests (added 9 tests, no errors) (2 errors on existing tests with the nc dataset)
All 9 newly added tests pass with 0 error.
Notes: The two existing tests(test_thresholdsize, test_basinValue) failed on the north carolina dataset as it gave a different maximum value for the basin.
Addresses requests in #6953.