Skip to content

test: set pytest-asyncio's default fixture loop scope explicitly - #15

Merged
Odrec merged 1 commit into
mainfrom
test/asyncio-fixture-loop-scope
Nov 4, 2026
Merged

Odrec merged 1 commit into
mainfrom
test/asyncio-fixture-loop-scope

Conversation

@Odrec

@Odrec Odrec commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

pytest-asyncio warns on every run that asyncio_default_fixture_loop_scope is unset and that its default will change to "function" in a future version.

The suite's only async fixture (client in tests/conftest.py) is function-scoped, so "function" is the loop scope it already gets. Setting it explicitly changes no behaviour and silences the warning before it becomes an error. The suite passes with -W error::pytest.PytestDeprecationWarning.

🤖 Generated with Claude Code

pytest-asyncio warns on every run that asyncio_default_fixture_loop_scope
is unset and that its default will change to "function" in a future
version. The suite's only async fixture (client) is function-scoped, so
"function" is what it already gets; setting it keeps that and silences
the warning before it becomes an error.
@Odrec
Odrec merged commit f976eaf into main Nov 4, 2026
1 check passed
@Odrec
Odrec deleted the test/asyncio-fixture-loop-scope branch November 4, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant