unittest._TextTestResult

unittest :: _TextTestResult :: 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
addError(self, test, err) Called when an error has occurred. | source code
addFailure(self, test, err) Called when an error has occurred. | source code
addSuccess(self, test) Called when a test has completed successfully | source code
getDescription(self, test) | source code
printErrorList(self, flavour, errors) | source code
printErrors(self) | source code
startTest(self, test) Called when the given test is about to be run | source code
Inherited from `TestResult`: `__repr__`, `stop`, `stopTest`, `wasSuccessful` Inherited from `TestResult` (private): `_count_relevant_tb_levels`, `_exc_info_to_string`, `_is_relevant_tb_level` 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) | source code
x.__init__(...) initializes x; see x.__class__.__doc__ for signature Overrides: TestResult.__init__

### 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)

### addSuccess(self, test) | source code
Called when a test has completed successfully Overrides: TestResult.addSuccess (inherited documentation)

### startTest(self, test) | source code
Called when the given test is about to be run Overrides: TestResult.startTest (inherited documentation)

Class Variable Details | [hide private]

  ### separator1 Value:
      '=====================================================================
      ='

  ### separator2 Value:
      '---------------------------------------------------------------------
      -'