Skip to content

Commit 26b8c8c

Browse files
author
Maxim Tulskiy
committed
tests: add pytest.ini to set asyncio_default_fixture_loop_scope
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]>
1 parent af36e10 commit 26b8c8c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pytest.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[pytest]
2+
asyncio_default_fixture_loop_scope = function

0 commit comments

Comments
 (0)