Back to module index
Go to module by name
unittest
unittest.runner
Running tests
Classes
TextTestResult
A test result class that can print formatted text results to a stream.
Used by TextTestRunner.
addError(self, test, err)
addExpectedFailure(self, test, err)
addFailure(self, test, err)
addSkip(self, test, reason)
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)
addUnexpectedSuccess(self, test)
getDescription(self, test)
printErrorList(self, flavour, errors)
printErrors(self)
startTest(self, test)
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.
separator1 = '======================================================================'
separator2 = '----------------------------------------------------------------------'
TextTestRunner
A test runner class that displays results in textual form.
It prints out the names of tests as they are run, errors as they
occur, and a summary of the results at the end of the test run.
run.TextTestResult
A test result class that can print formatted text results to a stream.
Used by TextTestRunner.
addError(self, test, err)
addExpectedFailure(self, test, err)
addFailure(self, test, err)
addSkip(self, test, reason)
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)
addUnexpectedSuccess(self, test)
getDescription(self, test)
printErrorList(self, flavour, errors)
printErrors(self)
startTest(self, test)
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.
separator1 = '======================================================================'
separator2 = '----------------------------------------------------------------------'
run(self, test)
Run the given test case or test suite.
Functions
registerResult
registerResult(result)
Modules
result
sys
time
warnings