Skip to content

Commit 58cf20e

Browse files
Update :class:pytest.PytestUnhandledCoroutineWarning to a deprecation; it will raise an error in pytest 8. [SQUASH] (#10012)
Co-authored-by: Bruno Oliveira <[email protected]>
1 parent f43ddd8 commit 58cf20e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

changelog/10012.deprecation.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update :class:`pytest.PytestUnhandledCoroutineWarning` to a deprecation; it will raise an error in pytest 8.

src/_pytest/warning_types.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ class PytestRemovedIn8Warning(PytestDeprecationWarning):
5555
__module__ = "pytest"
5656

5757

58-
@final
5958
class PytestReturnNotNoneWarning(PytestDeprecationWarning):
6059
"""Warning emitted when a test function is returning value other than None."""
6160

@@ -82,7 +81,7 @@ def simple(cls, apiname: str) -> "PytestExperimentalApiWarning":
8281

8382

8483
@final
85-
class PytestUnhandledCoroutineWarning(PytestWarning):
84+
class PytestUnhandledCoroutineWarning(PytestReturnNotNoneWarning):
8685
"""Warning emitted for an unhandled coroutine.
8786
8887
A coroutine was encountered when collecting test functions, but was not

0 commit comments

Comments
 (0)