Files
rio/tests/test_layouting/conftest.py
2024-12-29 16:27:01 +01:00

14 lines
440 B
Python

import pytest
from tests.utils.layouting import cleanup, setup
# Somewhat counter-intuitively, `scope='module'` would be incorrect here. That
# would execute the fixture once for each submodule. Scoping it to the session
# instead does exactly what we want: It runs only once, and only if it's needed.
@pytest.fixture(scope="session", autouse=True)
async def manage_server():
await setup()
yield
await cleanup()