Single event loop for the module so DB managers and tests share one loop.
()
| 45 | |
| 46 | @pytest_asyncio.fixture |
| 47 | def event_loop(): |
| 48 | """Single event loop for the module so DB managers and tests share one loop.""" |
| 49 | loop = asyncio.new_event_loop() |
| 50 | yield loop |
| 51 | loop.close() |
| 52 | |
| 53 | |
| 54 | @pytest_asyncio.fixture(scope="module", autouse=True) |