Skip to content

Add comprehensive tests for previously uncovered functionality#118

Merged
giordano merged 2 commits intomainfrom
mg/tests
Mar 25, 2026
Merged

Add comprehensive tests for previously uncovered functionality#118
giordano merged 2 commits intomainfrom
mg/tests

Conversation

@giordano
Copy link
Collaborator

@giordano giordano commented Mar 25, 2026

I'm planning to do some refactoring, so I asked my friendly assistant to add more tests (both unit and integration) for this package. I reviewed all the changes, and for example I removed a pointless test.

Probably some of these tests could still be improved (I'm not super happy about the RSS memory test just checking get_max_worker_rss() > 0 for the default case, but we'd basically have to hardcode the default value, which depends on various conditions, and that seems a bit meh, but I guess at least checking that the result is strictly positive is better than nothing), but they looked overall sensible to me.

giordano and others added 2 commits March 25, 2026 18:22
Cover parse_args, filter_tests!, extract_flag!, find_tests edge cases,
get_max_worker_rss, test_exe, non-verbose mode, quickfail, positional
filtering, addworkers, multi-job parallelism, worker RSS recycling,
mixed pass/fail, and empty test suite.

Co-authored-by: Claude <noreply@anthropic.com>
Made-with: Cursor
For this test to be really useful, we'd need to test that `pass-test` isn't run
at all, but the exact order of execution of the tests isn't determistic at the
moment, by design (unless we passed another argument with the exact desidered
order of the tests), so this test isn't much useful.
@giordano giordano merged commit 5ad80db into main Mar 25, 2026
20 checks passed
@giordano giordano deleted the mg/tests branch March 25, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant