Closed
Description
Pytest-asyncio users with a session-scoped event loop would have to add pytestmark = pytest.mark.asyncio(scope="session")
for every package and subpackage to address the deprecation of event_loop fixture overrides (see discussion in #670).
This solution only applies to users that actually use test packages. Users that don't use test packages would have to add __init__.py
files first or add pytestmark = pytest.mark.asyncio(scope="session")
to each test module.
The goal of this issue is to have a more convenient way to configure session-scoped loops. Possible solutions:
a configuration fixturea config option to set the default loop scope (mentioned previously, but I cannot find the reference)- a config option to set the default test scope
- a pytest hook