Skip to content

Commit 0a6765a

Browse files
committed
Explicitly set asyncio_default_fixture_loop_scope to get rid of the DeprecationWarning
PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset. The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session" see: pytest-dev/pytest-asyncio#924
1 parent 4d6b7ff commit 0a6765a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -156,5 +156,6 @@ required-imports = ["from __future__ import annotations"]
156156

157157
[tool.pytest.ini_options]
158158
asyncio_mode = "auto"
159+
asyncio_default_fixture_loop_scope="function"
159160
testpaths = ["tests"]
160161
addopts = "--strict-markers"

0 commit comments

Comments
 (0)