For pytest-asyncio >= 1.1.0,
#pyproject.toml
...
[tool.pytest.ini_options]
asyncio_default_fixture_loop_scope = "session"
asyncio_default_test_loop_scope = "session"
if use other configuration, reference
https://pytest-asyncio.readthedocs.io/en/latest/how-to-guides/change_default_fixture_loop.html
https://pytest-asyncio.readthedocs.io/en/latest/how-to-guides/change_default_test_loop.html