How to tell if a test function is async
Use pytest_asyncio.is_async_item
to determine if a test item is asynchronous and managed by pytest-asyncio.
from pytest_asyncio import is_async_test
def pytest_collection_modifyitems(items):
for item in items:
if is_async_test(item):
pass