File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -861,7 +861,7 @@ def pytest_fixture_setup(
861861 # Weird behavior was observed when checking for an attribute of FixtureDef.func
862862 # Instead, we now check for a special attribute of the returned event loop
863863 fixture_filename = inspect .getsourcefile (fixturedef .func )
864- if not getattr (loop , "__original_fixture_loop" , False ):
864+ if not _is_pytest_asyncio_loop (loop ):
865865 _ , fixture_line_number = inspect .getsourcelines (fixturedef .func )
866866 warnings .warn (
867867 _REDEFINED_EVENT_LOOP_FIXTURE_WARNING
@@ -1154,7 +1154,7 @@ def event_loop(request: FixtureRequest) -> Iterator[asyncio.AbstractEventLoop]:
11541154 # set this value.
11551155 # The magic value must be set as part of the function definition, because pytest
11561156 # seems to have multiple instances of the same FixtureDef or fixture function
1157- loop . __original_fixture_loop = True # type: ignore[attr-defined]
1157+ loop = _make_pytest_asyncio_loop ( loop )
11581158 yield loop
11591159 loop .close ()
11601160
You can’t perform that action at this time.
0 commit comments