Test project and `wtt` commands now set the exit code after execution. This can allow the framework to be integrated with automation tools.
Details
`__main__`:
- `main()` now calls `sys.exit(exit_code)`, where `exit_code` is 0 if command was executed without issue, or 1 if an exception occurred or no command was specified. Exceptions are printed before exiting
`project.test_module`:
- `main()` now calls `sys.exit(exit_code)`, where `exit_code` is 0 if command was executed without issue, or 1 if an exception occurred or the `parse_<command>_args()` function returned a non-zero exit code. Exceptions are printed before exiting
`project.cmd.common`:
- Removed `load_tests()` as its only purpose was to wrap `test_loader.load_project_test()` and catch and print any exceptions, which are now propagated to `test_module.main()`. Functions in `list` and `run` that used this now call `test_loader.load_project_test()` directly
`project.cmd.list`:
- `parse_list_args()` now returns an exit code
`project.cmd.new`:
- `parse_new_args()` now returns an exit code and no longer catches exceptions, letting them propagate to `test_module.main()`
`project.cmd.run`:
- `parse_run_args()` now returns an exit code based on the results of `run_tests()`
- `run_tests()` now captures the results of `test_runner.run()` and returns 0 if all tests passed, or 1 if there were any failures