Go to the latest version of this document.

# ``twisted`.`trial`.`itrial`.`IReporterWithDurations``

interface documentation

`class IReporterWithDurations(IReporter): (source)`

Known implementations: `twisted.trial._dist.distreporter.DistReporter`, `twisted.trial.reporter.TestResultDecorator`

View In Hierarchy

The `IReporter` interface with the 'durations' additions added to the standard library in 3.12.

Method | `addDuration` | Collect a duration for `test` into `IReporterWithDurations.collectedDurations`.
Attribute | `collectedDurations` | The collected durations of the tests reported.

Inherited from `IReporter`:

Method | `addError` | Record that a test has raised an unexpected exception.
Method | `addExpectedFailure` | Record that the given test failed, and was expected to do so.
Method | `addFailure` | Record that a test has failed with the given failure.
Method | `addSkip` | Record that a test has been skipped for the given reason.
Method | `addSuccess` | Record that test passed.
Method | `addUnexpectedSuccess` | Record that the given test failed, and was expected to do so.
Method | `done` | Called when the test run is complete.
Method | `startTest` | Report the beginning of a run of a single test method.
Method | `stopTest` | Report the status of a single test method
Method | `wasSuccessful` | Return a boolean indicating whether all test results that were reported to this reporter were successful or not.
Attribute | `shouldStop` | A boolean indicating that this reporter would like the test run to stop.
Attribute | `testsRun` | The number of tests that seem to have been run according to this reporter.

def addDuration(test: `TestCase`, elapsed: `float`): (source)

Collect a duration for `test` into `IReporterWithDurations.collectedDurations`.

collectedDurations: `list[tuple[str, float]]` = (source)

The collected durations of the tests reported.