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

Class _TextTestResult

source code

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

Inherited from TestResult: __repr__, stop, stopTest, wasSuccessful

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

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

Inherited from object: __class__

Method Details [hide private]

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

source code 

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

Overrides: object.__init__
(inherited documentation)

startTest(self, test)

source code 

Called when the given test is about to be run

Overrides: TestResult.startTest
(inherited documentation)

addSuccess(self, test)

source code 

Called when a test has completed successfully

Overrides: TestResult.addSuccess
(inherited documentation)

addError(self, test, err)

source code 

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)

source code 

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