Skip to content

Commit

Permalink
Update :class:pytest.PytestUnhandledCoroutineWarning to a deprecati…
Browse files Browse the repository at this point in the history
…on; it will raise an error in pytest 8. [SQUASH] (#10012)

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
  • Loading branch information
graingert and nicoddemus committed Aug 8, 2022
1 parent f43ddd8 commit 58cf20e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog/10012.deprecation.rst
@@ -0,0 +1 @@
Update :class:`pytest.PytestUnhandledCoroutineWarning` to a deprecation; it will raise an error in pytest 8.
3 changes: 1 addition & 2 deletions src/_pytest/warning_types.py
Expand Up @@ -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."""

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


@final
class PytestUnhandledCoroutineWarning(PytestWarning):
class PytestUnhandledCoroutineWarning(PytestReturnNotNoneWarning):
"""Warning emitted for an unhandled coroutine.
A coroutine was encountered when collecting test functions, but was not
Expand Down

0 comments on commit 58cf20e

Please sign in to comment.