unittest.TextTestResult¶
-
class
unittest.TextTestResult(stream, descriptions, verbosity)[source]¶ A test result class that can print formatted text results to a stream.
Used by TextTestRunner.
Methods¶
__format__ |
default object formatter |
__init__(stream, descriptions, verbosity) |
|
__new__((S, ...) |
|
__reduce__ |
helper for pickle |
__reduce_ex__ |
helper for pickle |
__repr__() |
|
__sizeof__(() -> int) |
size of object in memory, in bytes |
__subclasshook__ |
Abstract classes can override this to customize issubclass(). |
_count_relevant_tb_levels(tb) |
|
_exc_info_to_string(err, test) |
Converts a sys.exc_info()-style tuple of values into a string. |
_is_relevant_tb_level(tb) |
|
_restoreStdout() |
|
_setupStdout() |
|
addError(test, err) |
|
addExpectedFailure(test, err) |
|
addFailure(test, err) |
|
addSkip(test, reason) |
|
addSuccess(test) |
|
addUnexpectedSuccess(test) |
|
getDescription(test) |
|
printErrorList(flavour, errors) |
|
printErrors() |
|
startTest(test) |
|
startTestRun() |
Called once before any tests are executed. |
stop() |
Indicates that the tests should be aborted |
stopTest(test) |
Called when the given test has been run |
stopTestRun() |
Called once after all tests are executed. |
wasSuccessful() |
Tells whether or not this result was a success |
Attributes¶
separator1 |
|
separator2 |