Add PytestRemovedIn9Warning

It's good to have it available already in all 8.* versions, even if it's
not used yet.
This commit is contained in:
Ran Benita 2023-06-23 15:25:52 +03:00
parent a4a189ad99
commit 1b7896f83d
3 changed files with 11 additions and 0 deletions

View File

@ -1153,6 +1153,9 @@ Custom warnings generated in some situations such as improper usage or deprecate
.. autoclass:: pytest.PytestRemovedIn8Warning
:show-inheritance:
.. autoclass:: pytest.PytestRemovedIn9Warning
:show-inheritance:
.. autoclass:: pytest.PytestUnhandledCoroutineWarning
:show-inheritance:

View File

@ -56,6 +56,12 @@ class PytestRemovedIn8Warning(PytestDeprecationWarning):
__module__ = "pytest"
class PytestRemovedIn9Warning(PytestDeprecationWarning):
"""Warning class for features that will be removed in pytest 9."""
__module__ = "pytest"
class PytestReturnNotNoneWarning(PytestRemovedIn8Warning):
"""Warning emitted when a test function is returning value other than None."""

View File

@ -71,6 +71,7 @@ from _pytest.warning_types import PytestConfigWarning
from _pytest.warning_types import PytestDeprecationWarning
from _pytest.warning_types import PytestExperimentalApiWarning
from _pytest.warning_types import PytestRemovedIn8Warning
from _pytest.warning_types import PytestRemovedIn9Warning
from _pytest.warning_types import PytestReturnNotNoneWarning
from _pytest.warning_types import PytestUnhandledCoroutineWarning
from _pytest.warning_types import PytestUnhandledThreadExceptionWarning
@ -131,6 +132,7 @@ __all__ = [
"PytestDeprecationWarning",
"PytestExperimentalApiWarning",
"PytestRemovedIn8Warning",
"PytestRemovedIn9Warning",
"PytestReturnNotNoneWarning",
"Pytester",
"PytestPluginManager",