r.in.ascii: migrate tests from gunittest to pytest - #7780
Open
Valyrian-Code wants to merge 1 commit into
Open
Conversation
echoix
requested changes
Jul 27, 2026
Comment on lines
+9
to
+26
| INPUT_EXPLICIT_NULL = """north: 4299000.00 | ||
| south: 4247000.00 | ||
| east: 528000.00 | ||
| west: 500000.00 | ||
| rows: 10 | ||
| cols: 15 | ||
| null: -9999 | ||
|
|
||
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ||
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ||
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ||
| 1 2 3 4 5 6 7 8 9 10 11 12 13 -9999 15 | ||
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ||
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ||
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ||
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 -9999 | ||
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ||
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15""" |
Member
There was a problem hiding this comment.
This isn't the same as the previously checked value.
Comment on lines
+28
to
+40
| INPUT_DEFAULT_NULL = """north: 220542 | ||
| south: 220528 | ||
| east: 638492 | ||
| west: 638478 | ||
| rows: 7 | ||
| cols: 7 | ||
| 3 2 5 3 5 3 4 | ||
| 1 4 5 5 5 * 4 | ||
| 2 1 * 3 5 5 2 | ||
| 4 2 4 4 4 5 4 | ||
| 4 4 2 * 5 2 4 | ||
| 1 2 1 1 2 2 2 | ||
| 5 4 1 2 3 4 2""" |
Member
There was a problem hiding this comment.
Make sure that even the line endings are the same from what was there before.
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.
Migrates the r.in.ascii testsuite from gunittest to pytest, continuing the one-at-a-time migrations from #7635/#7675.
Both tests use io.StringIO for input instead of stdin or an external file. The null-value test previously never included an actual null value in its data, so it only checked that the header parsed; it now injects two -9999 cells and asserts null_cells == 2. The default-null-character test keeps its original intent (a bare * marks a cell NULL) and its null_cells == 3 check.
Verified locally, both tests pass.