ID EN
Unittest

TextTestRunner

Python 3.11

A basic test runner implementation that outputs results to a stream. If stream is None, the default, sys.stderr is used as the output stream. This class has a few configurable parameters, but is essentially very simple. Graphical applications which run test suites should provide alternate implementations. Such implementations should accept **kwargs as the interface to construct runners changes when features are added to unittest.

Syntax

PYTHON
class unittest.TextTestRunner(stream=None, descriptions=True, verbosity=1, failfast=False, buffer=False, resultclass=None, warnings=None, *, tb_locals=False)

Examples

Example 1
PYTHON
stream, descriptions, verbosity

See Also

sys.stderr DeprecationWarning PendingDeprecationWarning ResourceWarning ImportWarning ignored by default deprecated unittest methods Warning control