(nodeid: str)
| 169 | |
| 170 | |
| 171 | def async_warn_and_skip(nodeid: str) -> None: |
| 172 | msg = "async def functions are not natively supported and have been skipped.\n" |
| 173 | msg += ( |
| 174 | "You need to install a suitable plugin for your async framework, for example:\n" |
| 175 | ) |
| 176 | msg += " - anyio\n" |
| 177 | msg += " - pytest-asyncio\n" |
| 178 | msg += " - pytest-tornasync\n" |
| 179 | msg += " - pytest-trio\n" |
| 180 | msg += " - pytest-twisted" |
| 181 | warnings.warn(PytestUnhandledCoroutineWarning(msg.format(nodeid))) |
| 182 | skip(reason="async def function and no async plugin installed (see warnings)") |
| 183 | |
| 184 | |
| 185 | @hookimpl(trylast=True) |
no test coverage detected