Add negative test cases to commandParser unit tests
Opened this issue · 0 comments
davidmisiak commented
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).