$ pytest -o asyncio_default_fixture_loop_scope=function test_foo.py -vv
========================================================= test session starts =========================================================
platform linux -- Python 3.13.5, pytest-8.4.1, pluggy-1.6.0 -- /tmp/fakeredis-py/.venv/bin/python3
cachedir: .pytest_cache
hypothesis profile 'default'
rootdir: /tmp
plugins: asyncio-1.1.0, hypothesis-6.136.6
asyncio: mode=Mode.STRICT, debug=False, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function
collected 1 item
test_foo.py::test_foo ERROR [100%]
=============================================================== ERRORS ================================================================
_____________________________________________________ ERROR at setup of test_foo ______________________________________________________
ScopeMismatch: You tried to access the function scoped fixture _function_scoped_runner with a session scoped request object. Requesting fixture stack:
test_foo.py:4: def foo()
Requested fixture:
pytest-asyncio/pytest_asyncio/plugin.py:774: def _scoped_runner(event_loop_policy, request: 'FixtureRequest') -> 'Iterator[Runner]'
======================================================= short test summary info =======================================================
ERROR test_foo.py::test_foo - Failed: ScopeMismatch: You tried to access the function scoped fixture _function_scoped_runner with a session scoped request object. Requesting fixture stack:
test_foo.py:4: def foo()
Requested fixture:
pytest-asyncio/pytest_asyncio/plugin.py:774: def _scoped_runner(event_loop_policy, request: 'FixtureRequest') -> 'Iterator[Runner]'
========================================================== 1 error in 0.12s ===========================================================