g.remove: migrate tests from gunittest to pytest - #7896
Conversation
Good :) |
ninsbl
left a comment
There was a problem hiding this comment.
THe number of maps in the test may be reduced, but the test is rewritten from the original unittest 1:1. So, OK for me to merge anyway, as the tiny maps do not have a very significant input on run time, but things accumulate...
|
Thanks for approving. Fair point on the map count, I kept it 1:1 with the original gunittest for a faithful migration, but fewer would work just as well here. Will use smaller counts going forward where the original test's exact number was not itself the point. |
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.