unittest :: runner :: TextTestResult :: Class TextTestResult
[hide private]
[frames] | no frames]

type TextTestResult

Known Subclasses:

A test result class that can print formatted text results to a stream.

Used by TextTestRunner.

Instance Methods [hide private]
 
__init__(self, stream, descriptions, verbosity)
 
addError(self, test, err)
Called when an error has occurred.
 
addExpectedFailure(self, test, err)
Called when an expected failure/error occured.
 
addFailure(self, test, err)
Called when an error has occurred.
 
addSkip(self, test, reason)
Called when a test is skipped.
 
addSuccess(self, test)
Called when a test has completed successfully
 
addUnexpectedSuccess(self, test)
Called when a test was expected to fail, but succeed.
 
getDescription(self, test)
 
printErrorList(self, flavour, errors)
 
printErrors(self)
Called by TestRunner after test run
 
startTest(self, test)
Called when the given test is about to be run

Inherited from result.TestResult: __repr__, startTestRun, stop, stopTest, stopTestRun, wasSuccessful

Inherited from result.TestResult (private): _count_relevant_tb_levels, _exc_info_to_string, _is_relevant_tb_level, _restoreStdout, _setupStdout

Class Variables [hide private]
  separator1 = '================================================...
  separator2 = '------------------------------------------------...

Inherited from result.TestResult (private): _moduleSetUpFailed, _previousTestClass, _testRunEntered

Method Details [hide private]

__init__(self, stream, descriptions, verbosity)
(Constructor)

 
Overrides: result.TestResult.__init__

addError(self, test, err)

 

Called when an error has occurred. 'err' is a tuple of values as returned by sys.exc_info().

Overrides: result.TestResult.addError
(inherited documentation)

addExpectedFailure(self, test, err)

 

Called when an expected failure/error occured.

Overrides: result.TestResult.addExpectedFailure
(inherited documentation)

addFailure(self, test, err)

 

Called when an error has occurred. 'err' is a tuple of values as returned by sys.exc_info().

Overrides: result.TestResult.addFailure
(inherited documentation)

addSkip(self, test, reason)

 

Called when a test is skipped.

Overrides: result.TestResult.addSkip
(inherited documentation)

addSuccess(self, test)

 

Called when a test has completed successfully

Overrides: result.TestResult.addSuccess
(inherited documentation)

addUnexpectedSuccess(self, test)

 

Called when a test was expected to fail, but succeed.

Overrides: result.TestResult.addUnexpectedSuccess
(inherited documentation)

printErrors(self)

 

Called by TestRunner after test run

Overrides: result.TestResult.printErrors
(inherited documentation)

startTest(self, test)

 

Called when the given test is about to be run

Overrides: result.TestResult.startTest
(inherited documentation)

Class Variable Details [hide private]

separator1

Value:
'=====================================================================\
='

separator2

Value:
'---------------------------------------------------------------------\
-'