Class t.t.r.TreeReporter(Reporter):

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

Print out the tests in the form a tree.

Tests are indented according to which class and module they belong. Results are printed in ANSI color.
Method __init__ Undocumented
Method getDescription Return the name of the method which 'test' represents. This is
Method addSuccess Report that the given test succeeded.
Method addError Report an error that occurred while running the given test.
Method addFailure Report a failed assertion for the given test.
Method addSkip Report that the given test was skipped.
Method addExpectedFailure Report that the given test succeeded against expectations.
Method addUnexpectedSuccess Report that the given test succeeded against expectations.
Method write Undocumented
Method _testPrelude Undocumented
Method cleanupErrors Report an error that occurred during the cleanup between tests.
Method upDownError called when an error occurs in a setUp* or tearDown* method
Method startTest This must be called before the given test is commenced.
Method endLine Undocumented

Inherited from Reporter:

Method writeln Undocumented
Method _trimFrames Undocumented
Method _formatFailureTraceback Undocumented
Method _printResults Undocumented
Method _printExpectedFailure Undocumented
Method _printUnexpectedSuccess Undocumented
Method printErrors Print all of the non-success results in full to the stream.
Method printSummary Print a line summarising the test results to the stream.

Inherited from TestResult (via Reporter):

Method __repr__ Undocumented
Method _getTime Undocumented
Method stopTest This must be called after the given test is completed.
Method startSuite Undocumented
Method endSuite Undocumented
def __init__(self, stream=sys.stdout, tbformat='default', realtime=False): (source)
Undocumented
def getDescription(self, test): (source)

Return the name of the method which 'test' represents. This is what gets displayed in the leaves of the tree.

e.g. getDescription(TestCase('test_foo')) ==> test_foo
def addSuccess(self, test): (source)
Report that the given test succeeded.
Parameterstest(type: pyunit.TestCase )
def addError(self, *args): (source)
Report an error that occurred while running the given test.
Parameterstest(type: pyunit.TestCase )
fail(type: failure.Failure or tuple )
def addFailure(self, *args): (source)
Report a failed assertion for the given test.
Parameterstest(type: pyunit.TestCase )
fail(type: failure.Failure or tuple )
def addSkip(self, *args): (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 addExpectedFailure(self, *args): (source)

Report that the given test succeeded against expectations.

In Trial, tests can be marked 'todo'. That is, they are expected to fail.
Parameterstest(type: pyunit.TestCase )
error(type: failure.Failure )
todo(type: unittest.Todo )
def addUnexpectedSuccess(self, *args): (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 write(self, format, *args): (source)
Undocumented
def _testPrelude(self, test): (source)
Undocumented
def cleanupErrors(self, errs): (source)
Report an error that occurred during the cleanup between tests.
def upDownError(self, method, error, warn, printStatus): (source)
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 startTest(self, method): (source)
This must be called before the given test is commenced.
Parameterstest(type: pyunit.TestCase )
def endLine(self, message, color): (source)
Undocumented
API Documentation for twisted, generated by pydoctor.