Skip to content

Commit f91db08

Browse files
committed
refactor: Use is_async_test instead of isinstance check.
1 parent 49ddea1 commit f91db08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytest_asyncio/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ def pytest_pyfunc_call(pyfuncitem: Function) -> object | None:
639639
where the wrapped test coroutine is executed in an event loop.
640640
"""
641641
if pyfuncitem.get_closest_marker("asyncio") is not None:
642-
if isinstance(pyfuncitem, PytestAsyncioFunction):
642+
if is_async_test(pyfuncitem):
643643
asyncio_mode = _get_asyncio_mode(pyfuncitem.config)
644644
for fixname, fixtures in pyfuncitem._fixtureinfo.name2fixturedefs.items():
645645
# name2fixturedefs is a dict between fixture name and a list of matching

0 commit comments

Comments
 (0)