Help on class TestResult in unittest.result: unittest.result.TestResult = class TestResult(builtins.object) | unittest.result.TestResult(stream=None, descriptions=None, verbosity=None) | | 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. | | Methods defined here: | | __init__(self, stream=None, descriptions=None, verbosity=None) | Initialize self. See help(type(self)) for accurate signature. | | __repr__(self) | Return repr(self). | | addError(self, test, err) | Called when an error has occurred. 'err' is a tuple of values as | returned by sys.exc_info(). | | addExpectedFailure(self, test, err) | Called when an expected failure/error occurred. | | addFailure(self, test, err) | Called when an error has occurred. 'err' is a tuple of values as | returned by sys.exc_info(). | | addSkip(self, test, reason) | Called when a test is skipped. | | addSubTest(self, test, subtest, err) | Called at the end of a subtest. | 'err' is None if the subtest ended successfully, otherwise it's a | tuple of values as returned by sys.exc_info(). | | addSuccess(self, test) | Called when a test has completed successfully | | addUnexpectedSuccess(self, test) | Called when a test was expected to fail, but succeed. | | printErrors(self) | Called by TestRunner after test run | | startTest(self, test) | Called when the given test is about to be run | | startTestRun(self) | Called once before any tests are executed. | | See startTest for a method called before each test. | | stop(self) | Indicates that the tests should be aborted. | | stopTest(self, test) | Called when the given test has been run | | stopTestRun(self) | Called once after all tests are executed. | | See stopTest for a method called after each test. | | wasSuccessful(self) | Tells whether or not this result was a success. | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined)
Generated by phpman local Author: Che Dong Under GNU General Public License
2026-06-15 04:50 @216.73.216.200
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)