Skip to content

Conversation

Max-Tulskiy
Copy link

@Max-Tulskiy Max-Tulskiy commented Sep 23, 2025

What do these changes do?

Adds pytest.ini to set 'asyncio_default_fixture_loop_scope = function'
to prevent pytest-asyncio deprecation warnings breaking pytester tests.

Are there changes in behavior for the user?

None; only affects test runs.

Checklist

  • I think the code is well written
  • Unit tests for the changes exist (pytest.ini affects tests)

Recent versions of pytest-asyncio and pytest introduced
stricter handling of asynchronous fixtures. If the
'asyncio_default_fixture_loop_scope' option is unset, async fixtures may
emit DeprecationWarnings during pytest configuration. This can break tests
using pytester by preventing pytest from generating a terminal summary.

This prevents the warning and ensures consistent and stable test execution
for async tests.

Signed-off-by: Maxim Tulskiy <[email protected]>
@Max-Tulskiy Max-Tulskiy force-pushed the fix/pytest-asyncio-default-loop-scope branch from 2d6e4d3 to 26b8c8c Compare September 23, 2025 14:19
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