Staging: this is not the live site, pydocs.org.
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. Members of TestResult a addDuration Called when a test finished to run, regardless of its outcome. addError Called when an error has occurred. addSkip Called when a test is skipped. addSuccess Called when a test has completed successfully b buffer If set to true, sys.stdout and sys.stderr will be buffered in between startTest() and stopTest() being called. c collectedDurations A list containing 2-tuples of test case names and floats representing the elapsed time of each test which was run. e errors A list containing 2-tuples of TestCase instances and strings holding formatted tracebacks. expectedFailures A list containing 2-tuples of TestCase instances and strings holding formatted tracebacks. f failfast If set to true stop() will be called on the first failure or error, halting the test run. failures A list containing 2-tuples of TestCase instances and strings holding formatted tracebacks. s shouldStop Set to True when the execution of tests should stop by stop(). skipped A list containing 2-tuples of TestCase instances and strings holding the reason for skipping the test. startTest Called when the given test is about to be run stop Indicates that the tests should be aborted. stopTest Called when the given test has been run t tb_locals If set to true then local variables will be shown in tracebacks. testsRun The total number of tests run so far. u unexpectedSuccesses A list containing TestCase instances that were marked as expected failures, but succeeded.
Python docs © Python Software Foundation · Examples CC0 ·
Source on GitHub · Not affiliated with the PSF