@@ -251,15 +251,8 @@ def _preprocess_async_fixtures(
251
251
or default_loop_scope
252
252
or fixturedef .scope
253
253
)
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" ,)
263
256
_make_asyncio_fixture_function (func , scope )
264
257
function_signature = inspect .signature (func )
265
258
if "event_loop" in function_signature .parameters :
@@ -271,14 +264,8 @@ def _preprocess_async_fixtures(
271
264
f"instead."
272
265
)
273
266
)
274
- assert event_loop_fixture_id
275
267
if "request" not in fixturedef .argnames :
276
268
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" ,)
282
269
_synchronize_async_fixture (fixturedef )
283
270
assert _is_asyncio_fixture_function (fixturedef .func )
284
271
processed_fixturedefs .add (fixturedef )
0 commit comments