Warnings โ
Custom warnings generated in some situations such as improper usage or deprecated features.
class
PytestWarning โ
Bases: UserWarning
Base class for all warnings emitted by pytest.
class
PytestAssertRewriteWarning โ
Bases: PytestWarning
Warning emitted by the pytest assert rewrite module.
class
PytestCacheWarning โ
Bases: PytestWarning
Warning emitted by the cache plugin in various situations.
class
PytestCollectionWarning โ
Bases: PytestWarning
Warning emitted when pytest is not able to collect a file or symbol in a module.
class
PytestConfigWarning โ
Bases: PytestWarning
Warning emitted for configuration issues.
class
PytestDeprecationWarning โ
Bases: PytestWarning
, DeprecationWarning
Warning class for features that will be removed in a future version.
class
PytestExperimentalApiWarning โ
Bases: PytestWarning
, FutureWarning
Warning category used to denote experiments in pytest.
Use sparingly as the API might change or even be removed completely in a future version.
class
PytestReturnNotNoneWarning โ
Bases: PytestRemovedIn8Warning
Warning emitted when a test function is returning value other than None.
class
PytestRemovedIn8Warning โ
Bases: PytestDeprecationWarning
Warning class for features that will be removed in pytest 8.
class
PytestRemovedIn9Warning โ
Bases: PytestDeprecationWarning
Warning class for features that will be removed in pytest 9.
class
PytestUnhandledCoroutineWarning โ
Bases: PytestReturnNotNoneWarning
Warning emitted for an unhandled coroutine.
A coroutine was encountered when collecting test functions, but was not handled by any async-aware plugin. Coroutine test functions are not natively supported.
class
PytestUnknownMarkWarning โ
Bases: PytestWarning
Warning emitted on use of unknown markers.
See How to mark test functions with attributes for details.
class
PytestUnraisableExceptionWarning โ
Bases: PytestWarning
An unraisable exception was reported.
Unraisable exceptions are exceptions raised in __del__
implementations and similar situations when the exception cannot be raised as normal.
class
PytestUnhandledThreadExceptionWarning โ
Bases: PytestWarning
An unhandled exception occurred in a Thread.
Such exceptions donโt propagate normally.
Consult the Internal pytest warnings section in the documentation for more information.