Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolves #1642: our test output [is nice and tidy again](https://app.circleci.com/pipelines/github/tiny-pilot/tinypilot/4286/workflows/253f8f8b-b3af-47f8-82dc-b88e22d1122b/jobs/29448?invite=true#step-103-8652_129). Contrary to what I initially mentioned in the ticket, one of the two stacktraces didn’t come from [`test_process_with_result_child_exception`](https://github.com/tiny-pilot/tinypilot/blob/cd3f5ff30a04659a750aec6dbf60ca49927f10f0/app/execute_test.py#L58-L71), which already had the “[stderr silencing](https://github.com/tiny-pilot/tinypilot/blob/cd3f5ff30a04659a750aec6dbf60ca49927f10f0/app/execute_test.py#L61)”, but rather from [`test_background_thread_ignores_function_exception`](https://github.com/tiny-pilot/tinypilot/blob/cd3f5ff30a04659a750aec6dbf60ca49927f10f0/app/execute_test.py#L99-L100). (I’ve updated the ticket accordingly.) The “stderr silencing” technique is working fine, we just didn’t have it on the other two functions. These were added later, so we likely just forgot about this issue. I’ve extracted a context manager function, to make it easier to discover and re-use this technique in the tests, and to avoid us having to repeat the explanatory comment + exact invocation again and again. <a data-ca-tag href="https://codeapprove.com/pr/tiny-pilot/tinypilot/1708"><img src="https://codeapprove.com/external/github-tag-allbg.png" alt="Review on CodeApprove" /></a> --------- Co-authored-by: Jan Heuermann <[email protected]>
- Loading branch information