Holder for test result information.
Test results are automatically managed by the TestCase and TestSuite classes, and do not need to be explicitly manipulated by writers of tests.
Each instance holds the total number of tests run, and collections of failures and errors that occurred among those test runs. The collections contain tuples of (testcase, exceptioninfo), where exceptioninfo is the formatted traceback of the error that occurred.
There are no implemented interfaces.
There are no attributes in this class.
addError(test, err)
Called when an error has occurred. err
is a tuple of values as
returned by sys.exc_info().
addFailure(test, err)
Called when an error has occurred. err
is a tuple of values as
returned by sys.exc_info().
addSuccess(test)
Called when a test has completed successfully
startTest(test)
Called when the given test is about to be run
stop()
Indicates that the tests should be aborted
stopTest(test)
Called when the given test has been run
wasSuccessful()
Tells whether or not this result was a success