Module unittest :: Class _TextTestResult
[hide private]
[frames] | no frames]

type _TextTestResult

object --+    
         |    
TestResult --+
             |
            _TextTestResult

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)
 
getDescription(self, test)
 
startTest(self, test)
Called when the given test is about to be run
 
addSuccess(self, test)
Called when a test has completed successfully
 
addError(self, test, err)
Called when an error has occurred.
 
addFailure(self, test, err)
Called when an error has occurred.
 
printErrors(self)
 
printErrorList(self, flavour, errors)

Inherited from TestResult: __repr__, stop, stopTest, wasSuccessful

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

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

 
Overrides: TestResult.__init__

startTest(self, test)

 

Called when the given test is about to be run

Overrides: TestResult.startTest
(inherited documentation)

addSuccess(self, test)

 

Called when a test has completed successfully

Overrides: TestResult.addSuccess
(inherited documentation)

addError(self, test, err)

 

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

Overrides: TestResult.addError
(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: TestResult.addFailure
(inherited documentation)

Class Variable Details [hide private]

separator1

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

separator2

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