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

Class _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)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
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

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

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

Inherited from object: __class__

Method Details [hide private]

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

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

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:
'---------------------------------------------------------------------\
-'