In an E2E test I need to start an asyncio background task (a simulator that connects to the server under test) which will be used by all the tests in the module. The setUpModule would be the natural place to start it, but how can I start an asyncio background task from there?
To my understanding, the background task would need to be in the same asyncio event loop that runs the individual tests. Is this possible? I'm hoping to avoid threads / subprocesses.
I'm currently using unittest framework but can change that if another test framework supports this.