Go to the latest version of this document.

# ``twisted`.`trial`.`reporter``

module documentation
(source)

Defines classes that handle the results of tests.

Class | `MinimalReporter` | A minimalist reporter that prints only a summary of the test result, in the form of (timeTaken, #tests, #tests, #errors, #failures, #skips).
Class | `Reporter` | A basic `TestResult` with support for writing to a stream.
Class | `SafeStream` | Wraps a stream object so that all `write` calls are wrapped in `untilConcludes`.
Class | `SubunitReporter` | Reports test output via Subunit.
Class | `TestResult` | Accumulates the results of several `twisted.trial.unittest.TestCase`s.
Class | `TestResultDecorator` | Base class for TestResult decorators.
Class | `TextReporter` | Simple reporter that prints a single character for each test as it runs, along with the standard Trial summary text.
Class | `TimingTextReporter` | Prints out each test as it is running, followed by the time taken for each test to run.
Class | `TreeReporter` | Print out the tests in the form a tree.
Class | `UncleanWarningsReporterWrapper` | A wrapper for a reporter that converts `util.DirtyReactorAggregateError`s to warnings.
Class | `VerboseTextReporter` | A verbose reporter that prints the name of each test as it is running.
Exception | `BrokenTestCaseWarning` | Emitted as a warning when an exception occurs in one of setUp or tearDown.
Type Alias | `ExcInfo` | Undocumented
Type Alias | `TrialFailure` | Undocumented
Type Alias | `XUnitFailure` | Undocumented
Class | `_AdaptedReporter` | TestResult decorator that makes sure that addError only gets tests that have been adapted with a particular test adapter.
Class | `_AnsiColorizer` | A colorizer is an object that loosely wraps around a stream, allowing callers to write text to the stream in a particular color.
Class | `_ExitWrapper` | A wrapper for a reporter that causes the reporter to stop after unsuccessful tests.
Class | `_NullColorizer` | See _AnsiColorizer docstring.
Class | `_Win32Colorizer` | See _AnsiColorizer docstring.
Function | `_makeTodo` | Return a `Todo` object built from `value`.

ExcInfo: `TypeAlias` = (source)

Undocumented

Value

    tuple[type[BaseException], BaseException, TracebackType]

TrialFailure = (source)

Undocumented

Value

    XUnitFailure | Failure

XUnitFailure = (source)

Undocumented

Value

    ExcInfo | tuple[None, None, None]

def _makeTodo(value: `str`) -> `Todo`: (source)

Return a `Todo` object built from `value`.

This is a synonym for `twisted.trial.unittest.makeTodo`, but imported locally to avoid circular imports.

Parameters
value:`str` | A string or a tuple of `(errors, reason)`, where `errors` is either a single exception class or an iterable of exception classes.

Returns
`Todo` | A `Todo` object.