@@ -284,28 +284,23 @@ def _preprocess_async_fixtures(
284
284
and "event_loop" not in fixturedef .argnames
285
285
):
286
286
fixturedef .argnames += ("event_loop" ,)
287
- _synchronize_async_fixture (
288
- fixturedef ,
289
- event_loop_fixture_id ,
290
- )
287
+ _synchronize_async_fixture (fixturedef )
291
288
assert _is_asyncio_fixture_function (fixturedef .func )
292
289
processed_fixturedefs .add ((fixturedef , event_loop_fixture_id ))
293
290
294
291
295
- def _synchronize_async_fixture (
296
- fixturedef : FixtureDef , event_loop_fixture_id : str
297
- ) -> None :
292
+ def _synchronize_async_fixture (fixturedef : FixtureDef ) -> None :
298
293
"""
299
294
Wraps the fixture function of an async fixture in a synchronous function.
300
295
"""
301
296
if inspect .isasyncgenfunction (fixturedef .func ) or getattr (
302
297
fixturedef .func , "_async_fixture" , False
303
298
):
304
- _wrap_asyncgen_fixture (fixturedef , event_loop_fixture_id )
299
+ _wrap_asyncgen_fixture (fixturedef )
305
300
elif inspect .iscoroutinefunction (fixturedef .func ) or getattr (
306
301
fixturedef .func , "_async_fixture" , False
307
302
):
308
- _wrap_async_fixture (fixturedef , event_loop_fixture_id )
303
+ _wrap_async_fixture (fixturedef )
309
304
310
305
311
306
def _add_kwargs (
@@ -342,9 +337,8 @@ def _perhaps_rebind_fixture_func(
342
337
return func
343
338
344
339
345
- def _wrap_asyncgen_fixture (fixturedef : FixtureDef , event_loop_fixture_id : str ) -> None :
340
+ def _wrap_asyncgen_fixture (fixturedef : FixtureDef ) -> None :
346
341
fixture = fixturedef .func
347
-
348
342
if getattr (fixture , "_async_fixture" , False ):
349
343
return fixture
350
344
@@ -398,7 +392,7 @@ async def async_finalizer() -> None:
398
392
fixturedef .func = _asyncgen_fixture_wrapper
399
393
400
394
401
- def _wrap_async_fixture (fixturedef : FixtureDef , event_loop_fixture_id : str ) -> None :
395
+ def _wrap_async_fixture (fixturedef : FixtureDef ) -> None :
402
396
fixture = fixturedef .func
403
397
404
398
if getattr (fixture , "_async_fixture" , False ):
0 commit comments