Part of twisted.trial.reporter View Source View In Hierarchy
Implements interfaces: twisted.trial.itrial.IReporter
Instance Variables | _subunit | The subunit protocol client that we are wrapping. |
_successful | An internal variable, used to track whether we have received only successful results. | |
Present Since | 10.0 |
Method | __init__ | Construct a SubunitReporter .
|
Method | done | Record that the entire test suite run is finished. |
Method | shouldStop | Whether or not the test runner should stop running tests. |
Method | stop | Signal that the test runner should stop running tests. |
Method | wasSuccessful | Has the test run been successful so far? |
Method | startTest | Record that test has started.
|
Method | stopTest | Record that test has completed.
|
Method | addSuccess | Record that test was successful.
|
Method | addSkip | Record that test was skipped for reason .
|
Method | addError | Record that test failed with an unexpected error
err .
|
Method | addFailure | Record that test failed an assertion with the error
err .
|
Method | addExpectedFailure | Record an expected failure from a test. |
Method | addUnexpectedSuccess | Record an unexpected success. |
SubunitReporter
.
Parameters | stream | A file-like object representing the stream to print output to. Defaults to stdout. |
tbformat | The format for tracebacks. Ignored, since subunit always uses Python's standard format. | |
realtime | Whether or not to print exceptions in the middle of the test results. Ignored, since subunit always does this. | |
publisher | The log publisher which will be preserved for reporting events. Ignored, as it's not relevant to subunit. |
Record that the entire test suite run is finished.
We do nothing, since a summary clause is irrelevant to the subunit protocol.Returns | True if we have received no reports of errors or failures,
False otherwise.
|
Record that test
was skipped for reason
.
Parameters | test | A unittest-compatible TestCase .
|
reason | The reason for it being skipped. The str() of this object
will be included in the subunit output stream.
|
Record that test
failed with an unexpected error
err
.
SubunitReporter.wasSuccessful
to return False
.
Record that test
failed an assertion with the error
err
.
SubunitReporter.wasSuccessful
to return False
.
Record an expected failure from a test.
Some versions of subunit do not implement this. For those versions, we record a success.Record an unexpected success.
Since subunit has no way of expressing this concept, we record a success on the subunit stream.