@@ -251,15 +251,8 @@ def _preprocess_async_fixtures(
251251 or default_loop_scope
252252 or fixturedef .scope
253253 )
254- if scope == "function" :
255- event_loop_fixture_id : Optional [str ] = "event_loop"
256- else :
257- event_loop_node = _retrieve_scope_root (collector , scope )
258- event_loop_fixture_id = event_loop_node .stash .get (
259- # Type ignored because of non-optimal mypy inference.
260- _event_loop_fixture_id , # type: ignore[arg-type]
261- None ,
262- )
254+ if scope == "function" and "event_loop" not in fixturedef .argnames :
255+ fixturedef .argnames += ("event_loop" ,)
263256 _make_asyncio_fixture_function (func , scope )
264257 function_signature = inspect .signature (func )
265258 if "event_loop" in function_signature .parameters :
@@ -271,14 +264,8 @@ def _preprocess_async_fixtures(
271264 f"instead."
272265 )
273266 )
274- assert event_loop_fixture_id
275267 if "request" not in fixturedef .argnames :
276268 fixturedef .argnames += ("request" ,)
277- if (
278- event_loop_fixture_id == "event_loop"
279- and "event_loop" not in fixturedef .argnames
280- ):
281- fixturedef .argnames += ("event_loop" ,)
282269 _synchronize_async_fixture (fixturedef )
283270 assert _is_asyncio_fixture_function (fixturedef .func )
284271 processed_fixturedefs .add (fixturedef )
0 commit comments