@@ -268,7 +268,7 @@ def _synchronize_async_fixture(fixturedef: FixtureDef) -> None:
268
268
if inspect .isasyncgenfunction (fixturedef .func ):
269
269
_wrap_asyncgen_fixture (fixturedef )
270
270
elif inspect .iscoroutinefunction (fixturedef .func ):
271
- _wrap_async_fixture (fixturedef )
271
+ fixturedef . func = _wrap_async_fixture (fixturedef ) # type: ignore[misc]
272
272
273
273
274
274
def _add_kwargs (
@@ -346,12 +346,12 @@ async def async_finalizer() -> None:
346
346
fixturedef .func = _asyncgen_fixture_wrapper # type: ignore[misc]
347
347
348
348
349
- def _wrap_async_fixture (fixturedef : FixtureDef ) -> None :
350
- fixture = fixturedef .func
349
+ def _wrap_async_fixture (fixturedef : FixtureDef ) -> Callable :
350
+ fixture_function = fixturedef .func
351
351
352
- @functools .wraps (fixture )
352
+ @functools .wraps (fixture_function )
353
353
def _async_fixture_wrapper (request : FixtureRequest , ** kwargs : Any ):
354
- func = _perhaps_rebind_fixture_func (fixture , request .instance )
354
+ func = _perhaps_rebind_fixture_func (fixture_function , request .instance )
355
355
event_loop_fixture_id = _get_event_loop_fixture_id_for_async_fixture (
356
356
request , func
357
357
)
@@ -380,7 +380,7 @@ async def setup():
380
380
381
381
return result
382
382
383
- fixturedef . func = _async_fixture_wrapper # type: ignore[misc]
383
+ return _async_fixture_wrapper
384
384
385
385
386
386
def _get_event_loop_fixture_id_for_async_fixture (
0 commit comments