t.t.i.IReporter(zi.Interface) : interface documentation

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

Known implementations: twisted.plugins.twisted_trial._Reporter, twisted.trial._dist.distreporter.DistReporter, twisted.trial.reporter.Reporter, twisted.trial.reporter.SubunitReporter, twisted.trial.reporter.TestResult, twisted.trial.reporter.TestResultDecorator, twisted.trial.reporter.UncleanWarningsReporterWrapper

I report results from a run of a test suite.
Attribute stream Deprecated in Twisted 8.0. The io-stream that this reporter will write to
Attribute tbformat Either 'default', 'brief', or 'verbose'
Attribute args Additional string argument passed from the command line
Attribute shouldStop A boolean indicating that this reporter would like the test run to stop.
Attribute separator Deprecated in Twisted 8.0. A value which will occasionally be passed to the write method.
Attribute testsRun The number of tests that seem to have been run according to this reporter.
Method startTest Report the beginning of a run of a single test method.
Method stopTest Report the status of a single test method
Method startSuite Deprecated in Twisted 8.0.
Method endSuite Deprecated in Twisted 8.0.
Method cleanupErrors Deprecated in Twisted 8.0.
Method upDownError Deprecated in Twisted 8.0.
Method addSuccess Record that test passed.
Method addError Record that a test has raised an unexpected exception.
Method addFailure Record that a test has failed with the given failure.
Method addExpectedFailure Record that the given test failed, and was expected to do so.
Method addUnexpectedSuccess Record that the given test failed, and was expected to do so.
Method addSkip Record that a test has been skipped for the given reason.
Method printSummary Deprecated in Twisted 8.0, use done instead.
Method printErrors Deprecated in Twisted 8.0, use done instead.
Method write Deprecated in Twisted 8.0, use done instead.
Method writeln Deprecated in Twisted 8.0, use done instead.
Method wasSuccessful Return a boolean indicating whether all test results that were reported to this reporter were successful or not.
Method done Called when the test run is complete.
stream =
Deprecated in Twisted 8.0. The io-stream that this reporter will write to
tbformat =
Either 'default', 'brief', or 'verbose'
args =
Additional string argument passed from the command line
shouldStop =
A boolean indicating that this reporter would like the test run to stop.
separator =
Deprecated in Twisted 8.0. A value which will occasionally be passed to the write method.
testsRun =
The number of tests that seem to have been run according to this reporter.
def startTest(method): (source)
Report the beginning of a run of a single test method.
Parametersmethodan object that is adaptable to ITestMethod
def stopTest(method): (source)
Report the status of a single test method
Parametersmethodan object that is adaptable to ITestMethod
def startSuite(name): (source)
Deprecated in Twisted 8.0.

Suites which wish to appear in reporter output should call this before running their tests.

def endSuite(name): (source)
Deprecated in Twisted 8.0.

Called at the end of a suite, if and only if that suite has called startSuite.

def cleanupErrors(errs): (source)
Deprecated in Twisted 8.0.

Called when the reactor has been left in a 'dirty' state

Parameterserrsa list of twisted.python.failure.Failures
def upDownError(userMeth, warn=True, printStatus=True): (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 addSuccess(test): (source)
Record that test passed.
def addError(test, error): (source)
Record that a test has raised an unexpected exception.
ParameterstestThe test that has raised an error.
errorThe error that the test raised. It will either be a three-tuple in the style of sys.exc_info() or a Failure object.
def addFailure(test, failure): (source)
Record that a test has failed with the given failure.
ParameterstestThe test that has failed.
failureThe failure that the test failed with. It will either be a three-tuple in the style of sys.exc_info() or a Failure object.
def addExpectedFailure(test, failure, todo): (source)
Record that the given test failed, and was expected to do so.
ParameterstestThe test which this is about. (type: pyunit.TestCase)
errorThe error which this test failed with. (type: failure.Failure)
todoThe reason for the test's TODO status. (type: unittest.Todo)
def addUnexpectedSuccess(test, todo): (source)
Record that the given test failed, and was expected to do so.
ParameterstestThe test which this is about. (type: pyunit.TestCase)
todoThe reason for the test's TODO status. (type: unittest.Todo)
def addSkip(test, reason): (source)
Record that a test has been skipped for the given reason.
ParameterstestThe test that has been skipped.
reasonAn object that the test case has specified as the reason for skipping the test.
def printSummary(): (source)
Deprecated in Twisted 8.0, use done instead.

Present a summary of the test results.

def printErrors(): (source)
Deprecated in Twisted 8.0, use done instead.

Present the errors that have occured during the test run. This method will be called after all tests have been run.

def write(string): (source)
Deprecated in Twisted 8.0, use done instead.

Display a string to the user, without appending a new line.

def writeln(string): (source)
Deprecated in Twisted 8.0, use done instead.

Display a string to the user, appending a new line.

def wasSuccessful(): (source)
Return a boolean indicating whether all test results that were reported to this reporter were successful or not.
def done(): (source)
Called when the test run is complete.

This gives the result object an opportunity to display a summary of information to the user. Once you have called done on an IReporter object, you should assume that the IReporter object is no longer usable.

API Documentation for Twisted, generated by pydoctor at 2012-12-26 12:18:15.