Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add negative test cases to commandParser unit tests #111

Open
davidmisiak opened this issue Nov 18, 2021 · 0 comments
Open

Add negative test cases to commandParser unit tests #111

davidmisiak opened this issue Nov 18, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@davidmisiak
Copy link
Collaborator

Currently, we only test successful parsing attempts, negative tests (ie. invalid CLI arguments / argument combinations) should be added.

This requires setting exit_on_error=false in argparse when running tests (so that an exception is thrown instead of terminating the process).

Particularly, we should add negative tests of mutually exclusive flags, added in #109. Note that this may be a bit difficult - I suspect that this line in argparse causes process termination even when exit_on_error is false.

Some related discussion here #109 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant