Skip to content

g.remove: migrate tests from gunittest to pytest - #7896

Draft
Valyrian-Code wants to merge 1 commit into
OSGeo:mainfrom
Valyrian-Code:g.remove-pytest
Draft

g.remove: migrate tests from gunittest to pytest#7896
Valyrian-Code wants to merge 1 commit into
OSGeo:mainfrom
Valyrian-Code:g.remove-pytest

Conversation

@Valyrian-Code

Copy link
Copy Markdown
Contributor

Migrates the g.remove testsuite from gunittest to pytest, continuing the one-at-a-time migrations from #7635/#7675/#7780/#7893/#7894.

Same three cases as before: the dry-run listing versus -f actually removing and logging each removal to stderr, the exclude= option, and the -r/-e mutual exclusivity check.

One small change on that last one: the old test just checked that "-r" and "-e" both appear somewhere in the error output, which is true even for an unrelated error, since the full usage text always lists both flags. This checks the specific "mutually exclusive" message instead.

Verified locally, all three pass.

@echoix

echoix commented Sep 5, 2026

Copy link
Copy Markdown
Member

One small change on that last one: the old test just checked that "-r" and "-e" both appear somewhere in the error output, which is true even for an unrelated error, since the full usage text always lists both flags. This checks the specific "mutually exclusive" message instead.

Good :)

@github-actions github-actions Bot added Python Related code is in Python module general tests Related to Test Suite labels Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

general module Python Related code is in Python tests Related to Test Suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants