Skip to content

r.surf.random: Pin the values of a seed in a test - #8078

Merged
wenzeslaus merged 2 commits into
OSGeo:mainfrom
wenzeslaus:r-surf-random-tests
Oct 19, 2026
Merged

wenzeslaus merged 2 commits into
OSGeo:mainfrom
wenzeslaus:r-surf-random-tests

Conversation

@wenzeslaus

Copy link
Copy Markdown
Member

Adds a test to pin the float and the integer map generated by r.surf.random for one given seed on a region of 2 by 3 cells. A change of the random number generator would then show as a change of the results. The tool had no pytest tests and the gunittest suite checks only the value range.

The tests were written with the help of Claude Code (Fable 5.1) and reviewed by me.

Suggested squash commit message
r.surf.random: Pin the values of a seed in a test
The float and the integer map for one seed on a region of 2 by 3 cells,
so that a change of the random numbers behind the tool is noticed. The
tool had no pytest tests and the gunittest suite checks only the value
range.

The float and the integer map for seed 42 on a region of 2 by 3 cells,
so that a change of the random numbers behind the tool is noticed.

Written with the help of Claude Code.
@github-actions github-actions Bot added raster Related to raster data processing Python Related code is in Python module tests Related to Test Suite labels Oct 16, 2026
@wenzeslaus
wenzeslaus merged commit 9dd699c into OSGeo:main Oct 19, 2026
28 of 42 checks passed
@wenzeslaus
wenzeslaus deleted the r-surf-random-tests branch October 19, 2026 03:21
@github-actions github-actions Bot added this to the 8.6.0 milestone Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module Python Related code is in Python raster Related to raster data processing tests Related to Test Suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants