Class t.t.r.TestResult(pyunit.TestResult, object):

Part of twisted.trial.reporter View Source View In Hierarchy

Known subclasses: twisted.trial.reporter.Reporter

Implements interfaces: twisted.trial.itrial.IReporter

Accumulates the results of several twisted.trial.unittest.TestCases.
Instance Variablessuccessescount the number of successes achieved by the test run. (type: int )
Line # Kind Name Docs
57 Method __init__ Undocumented
65 Method __repr__ Undocumented
83 Method startTest This must be called before the given test is commenced.
92 Method stopTest This must be called after the given test is completed.
101 Method addFailure Report a failed assertion for the given test.
110 Method addError Report an error that occurred while running the given test.
119 Method addSkip Report that the given test was skipped.
132 Method addUnexpectedSuccess Report that the given test succeeded against expectations.
145 Method addExpectedFailure Report that the given test failed, and was expected to do so.
157 Method addSuccess Report that the given test succeeded.
164 Method upDownError Deprecated in Twisted 8.0.
168 Method cleanupErrors Report an error that occurred during the cleanup between tests.
175 Method startSuite Deprecated in Twisted 8.0.
179 Method endSuite Deprecated in Twisted 8.0.
184 Method done The test suite has finished running.
72 Method _getTime Undocumented
75 Method _getFailure Convert a sys.exc_info()-style tuple to a Failure, if necessary.
def __init__(self): (source)
Undocumented
def __repr__(self): (source)
Undocumented
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.
Parameterstest (type: pyunit.TestCase )
def stopTest(self, test): (source)
This must be called after the given test is completed.
Parameterstest (type: pyunit.TestCase )
def addFailure(self, test, fail): (source)
Report a failed assertion for the given test.
Parameterstest (type: pyunit.TestCase )
fail (type: Failure or tuple )
def addError(self, test, error): (source)
Report an error that occurred while running the given test.
Parameterstest (type: pyunit.TestCase )
error (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.
Parameterstest (type: pyunit.TestCase )
reason (type: str )
def addUnexpectedSuccess(self, test, todo): (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.
Parameterstest (type: pyunit.TestCase )
todo (type: unittest.Todo )
def addExpectedFailure(self, test, error, todo): (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.
Parameterstest (type: pyunit.TestCase )
error (type: Failure )
todo (type: unittest.Todo )
def addSuccess(self, test): (source)
Report that the given test succeeded.
Parameterstest (type: pyunit.TestCase )
def upDownError(self, method, error, warn, printStatus): (source)

Deprecated in Twisted 8.0.

Called when an error occurs in a setUp* or tearDown* method
Parameterswarnindicates whether or not the reporter should emit a warning about the error (type: Boolean )
printStatusindicates whether or not the reporter should print the name of the method and the status message appropriate for the type of error (type: Boolean )
def cleanupErrors(self, errs): (source)
Report an error that occurred during the cleanup between tests.
def startSuite(self, name): (source)

Deprecated in Twisted 8.0.

Suites which wish to appear in reporter output should call this before running their tests.
def endSuite(self, name): (source)

Deprecated in Twisted 8.0.

Called at the end of a suite, if and only if that suite has called startSuite.
def done(self): (source)
The test suite has finished running.
API Documentation for Twisted, generated by pydoctor at 2008-10-26 16:12:37.