Skip to content

Remove use of subprocessing in unit tests

Cal Pratt requested to merge cpratt34/simplified-pytest into master

Description

The way that many tests were created was to suprocess their work to avoid being blocked by the ongoing server thread. To avoid this, I've added hooks in the server startup and shutdown code to allow users to manage the asyncio loops themselves and allow a server to be created without blocking the main thread.

This means that all tests can now run natively on both linux and macos, and that we will be able to set proper breakpoints in the codebase while testing. This has also greatly simplified the setup of the mock fixtures used by our tests, as they no longer have to manage subprocesses.

Merge request reports