From a7be13b901f8b539867b6cc2745ad5ffaa98dd70 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Fri, 29 Jul 2022 10:22:44 +0100 Subject: [PATCH] deprecate returning awaitables --- src/_pytest/warning_types.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/_pytest/warning_types.py b/src/_pytest/warning_types.py index ebfeb87d8..c32ce80cc 100644 --- a/src/_pytest/warning_types.py +++ b/src/_pytest/warning_types.py @@ -55,7 +55,6 @@ class PytestRemovedIn8Warning(PytestDeprecationWarning): __module__ = "pytest" -@final class PytestReturnNotNoneWarning(PytestDeprecationWarning): """Warning emitted when a test function is returning value other than None.""" @@ -82,7 +81,7 @@ class PytestExperimentalApiWarning(PytestWarning, FutureWarning): @final -class PytestUnhandledCoroutineWarning(PytestWarning): +class PytestUnhandledCoroutineWarning(PytestReturnNotNoneWarning): """Warning emitted for an unhandled coroutine. A coroutine was encountered when collecting test functions, but was not