class documentation

class twisted.trial.reporter.TestResult(pyunit.TestResult): (source)

Known subclasses: twisted.trial._dist.workerreporter.WorkerReporter, twisted.trial.reporter.Reporter

Implements interfaces: twisted.trial.itrial.IReporter

View In Hierarchy

Accumulates the results of several twisted.trial.unittest.TestCases.

Instance Variable successes count the number of successes achieved by the test run.
Method __init__ Undocumented
Instance Variable skips Undocumented
Instance Variable expectedFailures Undocumented
Instance Variable unexpectedSuccesses Undocumented
Method __repr__ Undocumented
Method startTest This must be called before the given test is commenced.
Method stopTest This must be called after the given test is completed.
Method addFailure Report a failed assertion for the given test.
Method addError Report an error that occurred while running the given test.
Method addSkip Report that the given test was skipped.
Method addUnexpectedSuccess Report that the given test succeeded against expectations.
Method addExpectedFailure Report that the given test failed, and was expected to do so.
Method addSuccess Report that the given test succeeded.
Method wasSuccessful Report whether or not this test suite was successful or not.
Method done The test suite has finished running.
Class Variable _DEFAULT_TODO Undocumented
Instance Variable _timings Undocumented
Method _getTime Undocumented
Method _getFailure Convert a sys.exc_info()-style tuple to a Failure, if necessary.
Instance Variable _testStarted Undocumented
Instance Variable _lastTime Undocumented
successes = (source)
count the number of successes achieved by the test run.
(type: int)
_DEFAULT_TODO = (source)

Undocumented

(type: str)
skips = (source)

Undocumented

(type: list)
expectedFailures = (source)

Undocumented

(type: list)
unexpectedSuccesses = (source)

Undocumented

(type: list)
_timings = (source)

Undocumented

(type: list)
def __repr__(self): (source)

Undocumented

ReturnsUndocumented (type: str)
def _getTime(self): (source)

Undocumented

def _getFailure(self, error): (source)

Convert a sys.exc_info()-style tuple to a Failure, if necessary.

def startTest(self, test): (source)

This must be called before the given test is commenced.

ParameterstestUndocumented (type: pyunit.TestCase)
_testStarted = (source)

Undocumented

def stopTest(self, test): (source)

This must be called after the given test is completed.

ParameterstestUndocumented (type: pyunit.TestCase)
_lastTime = (source)

Undocumented

def addFailure(self, test, fail): (source)

Report a failed assertion for the given test.

ParameterstestUndocumented (type: pyunit.TestCase)
failUndocumented (type: Failure or tuple)
def addError(self, test, error): (source)

Report an error that occurred while running the given test.

ParameterstestUndocumented (type: pyunit.TestCase)
errorUndocumented (type: Failure or tuple)
def addSkip(self, test, reason): (source)

Report that the given test was skipped.

In Trial, tests can be 'skipped'. Tests are skipped mostly because there is some platform or configuration issue that prevents them from being run correctly.

ParameterstestUndocumented (type: pyunit.TestCase)
reasonUndocumented (type: str)
def addUnexpectedSuccess(self, test, todo=None): (source)

Report that the given test succeeded against expectations.

In Trial, tests can be marked 'todo'. That is, they are expected to fail. When a test that is expected to fail instead succeeds, it should call this method to report the unexpected success.

ParameterstestUndocumented (type: pyunit.TestCase)
todoUndocumented (type: unittest.Todo, or None, in which case a default todo message is provided.)
def addExpectedFailure(self, test, error, todo=None): (source)

Report that the given test failed, and was expected to do so.

In Trial, tests can be marked 'todo'. That is, they are expected to fail.

ParameterstestUndocumented (type: pyunit.TestCase)
errorUndocumented (type: Failure)
todoUndocumented (type: unittest.Todo, or None, in which case a default todo message is provided.)
def wasSuccessful(self): (source)

Report whether or not this test suite was successful or not.

The behaviour of this method changed in pyunit in Python 3.4 to fail if there are any errors, failures, or unexpected successes. Previous to 3.4, it was only if there were errors or failures. This method implements the old behaviour for backwards compatibility reasons, checking just for errors and failures.

ReturnsUndocumented (type: bool)
def done(self): (source)

The test suite has finished running.

API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.