v.what.strds: migrate tests from gunittest to pytest - #7898
v.what.strds: migrate tests from gunittest to pytest#7898Valyrian-Code wants to merge 2 commits into
Conversation
|
Same CI infra issue as noted on #7780: the failing checks are hitting an HTTP 504 from Launchpad while adding the ubuntugis-unstable PPA, unrelated to this PR. Should clear with a re-run. |
ninsbl
left a comment
There was a problem hiding this comment.
The rewrite with pytest looks good. That said, the test unfortunately does not really test the result correctness in a reliable way.
The raster maps contain only 1 value at a time, so one would not notice if e.g. points order gets mixed up. It would be better to create e.g. ranrom rasters or rasters where pixel values are x * y, along with a vector map with known point locations, so also pixel-shifts or point-reordering would ret noticed in the output.
That said, I have no objections merging this.
|
Thanks for the review and for merging this as is. Good point on the raster values, using position-dependent values (like x*y) with points at known locations would catch ordering or position bugs that flat single-value rasters can't. I will keep that in mind for the next few migrations. |
Migrates the v.what.strds testsuite from gunittest to pytest, continuing the one-at-a-time migrations from #7635/#7675/#7780/#7893/#7894/#7896.
Same setup and cases as before: a small strds with four registered rasters of known values, three points at the same location, checking that v.what.strds creates the output map and that every point's sampled value matches the registered raster for each time slot.
Verified locally, both pass.