From dce262171074274983a66c5bbc06c8242725fcd2 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Wed, 4 Mar 2020 17:42:08 -0500 Subject: [PATCH] Add pytest-twisted to list of async def handling plugins https://github.com/pytest-dev/pytest-twisted/tree/v1.12#ensuredeferred [pytest-twisted](https://github.com/pytest-dev/pytest-twisted) supports `async def` test functions and fixtures as well as `async def`/`yield` fixtures. --- src/_pytest/python.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/_pytest/python.py b/src/_pytest/python.py index ff00c4c45..bb2b43153 100644 --- a/src/_pytest/python.py +++ b/src/_pytest/python.py @@ -166,7 +166,8 @@ def async_warn(nodeid: str) -> None: ) msg += " - pytest-asyncio\n" msg += " - pytest-trio\n" - msg += " - pytest-tornasync" + msg += " - pytest-tornasync\n" + msg += " - pytest-twisted" warnings.warn(PytestUnhandledCoroutineWarning(msg.format(nodeid))) skip(msg="async def function and no async plugin installed (see warnings)")