Commit c99fe57 1 parent 581bd29 commit c99fe57 Copy full SHA for c99fe57
File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ def _preprocess_async_fixtures(
239
239
func
240
240
):
241
241
continue
242
- if not _is_asyncio_fixture_function ( func ) and asyncio_mode == Mode .STRICT :
242
+ if asyncio_mode == Mode .STRICT and not _is_asyncio_fixture_function ( func ) :
243
243
# Ignore async fixtures without explicit asyncio mark in strict mode
244
244
# This applies to pytest_trio fixtures, for example
245
245
continue
@@ -969,9 +969,9 @@ def pytest_pyfunc_call(pyfuncitem: Function) -> object | None:
969
969
# fixturedefs. The last entry in the list is closest and the one used.
970
970
func = fixtures [- 1 ].func
971
971
if (
972
- _is_coroutine_or_asyncgen (func )
972
+ asyncio_mode == Mode .STRICT
973
+ and _is_coroutine_or_asyncgen (func )
973
974
and not _is_asyncio_fixture_function (func )
974
- and asyncio_mode == Mode .STRICT
975
975
):
976
976
warnings .warn (
977
977
PytestDeprecationWarning (
You can’t perform that action at this time.
0 commit comments