nose: nose.result

Provides a TextTestResult that extends unittest._TextTestResult to provide support for error classes (such as the builtin skip and deprecated classes), and hooks for plugins to take over or extend reporting.

Classes

Highlighted methods are defined in this class.

TextTestResult (unittest._TextTestResult)

Text test result that extends unittest's default test result support for a configurable set of errorClasses (eg, Skip, Deprecated, TODO) that extend the errors/failures/success triad.

Methods

__init__(self, stream, descriptions, verbosity, config=None, errorClasses=None)
_addError(self, test, err)
_count_relevant_tb_levels(self, tb)(inherited from TestResult)
_exc_info_to_string(self, err, test=None)
_is_relevant_tb_level(self, tb)(inherited from TestResult)
addError(self, test, err)

Overrides normal addError to add support for errorClasses. If the exception is a registered class, the error will be added to the list for that class, not errors.

addFailure(self, test, err)(inherited from _TextTestResult)
addSuccess(self, test)(inherited from _TextTestResult)
getDescription(self, test)(inherited from _TextTestResult)
printErrorList(self, flavour, errors)(inherited from _TextTestResult)
printErrors(self)

Overrides to print all errorClasses errors as well.

printSummary(self, start, stop)

Called by the test runner to print the final summary of test run results.

startTest(self, test)(inherited from _TextTestResult)
stop(self)(inherited from TestResult)

Indicates that the tests should be aborted

stopTest(self, test)(inherited from TestResult)

Called when the given test has been run

wasSuccessful(self)

Overrides to check that there are no errors in errorClasses lists that are marked as errors that should cause a run to fail.

Attributes

separator1
Default value: ======================================================================
separator2
Default value: ----------------------------------------------------------------------

Functions

ln(*arg, **kw)

Attributes

log
Default value: <logging.Logger instance>