File tree 1 file changed +2
-2
lines changed
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(
861
861
# Weird behavior was observed when checking for an attribute of FixtureDef.func
862
862
# Instead, we now check for a special attribute of the returned event loop
863
863
fixture_filename = inspect .getsourcefile (fixturedef .func )
864
- if not getattr (loop , "__original_fixture_loop" , False ):
864
+ if not _is_pytest_asyncio_loop (loop ):
865
865
_ , fixture_line_number = inspect .getsourcelines (fixturedef .func )
866
866
warnings .warn (
867
867
_REDEFINED_EVENT_LOOP_FIXTURE_WARNING
@@ -1154,7 +1154,7 @@ def event_loop(request: FixtureRequest) -> Iterator[asyncio.AbstractEventLoop]:
1154
1154
# set this value.
1155
1155
# The magic value must be set as part of the function definition, because pytest
1156
1156
# 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 )
1158
1158
yield loop
1159
1159
loop .close ()
1160
1160
You can’t perform that action at this time.
0 commit comments