You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
put the whole CLI in main, making it easier to mock the tool in the test suite (currently we use subprocesses, which is slow, and requires several lines of boiler-plate test setup code)
Introduce CLIError and use it for usage errors Used ArgumentParser.error instead.
- Add and use CLIError exception for CLI usage errors
- On CLI error, print to stderr instead of stdout
- Put the entire CLI in main()
- Rework ClinicExternalTest to call main() instead of using subprocesses
- Use ArgumentParser.error() to handle CLI errors
- Put the entire CLI in main()
- Rework ClinicExternalTest to call main() instead of using subprocesses
Co-authored-by: AlexWaygood <[email protected]>
Suggesting to ...:
stderr
, notstdout
, on error (partly depends on Rework Argument Clinic error handling #107468)main
, making it easier to mock the tool in the test suite (currently we use subprocesses, which is slow, and requires several lines of boiler-plate test setup code)Introduce CLIError and use it for usage errorsUsedArgumentParser.error
instead.Linked PRs
The text was updated successfully, but these errors were encountered: