unittest.TestSuite.addTest()

addTest(test) Add a TestCase or TestSuite to the suite.

unittest.TestSuite.addTests()

addTests(tests) Add all the tests from an iterable of TestCase and TestSuite instances to this test suite. This is equivalent to iterating over tests, calling addTest() for each element.

unittest.TestSuite.countTestCases()

countTestCases() Return the number of tests represented by this test object, including all individual tests and sub-suites.

unittest.TestSuite

class unittest.TestSuite(tests=()) This class represents an aggregation of individual tests cases and test suites. The class presents the interface needed by the test runner to allow it to be run as any other test case. Running a TestSuite instance is the same as iterating over the suite, running each test individually. If tests is given, it must be an iterable of individual test cases or other test suites that will be used to build the suite initially. Additional methods are provided to add

unittest.TestResult.tb_locals

tb_locals If set to true then local variables will be shown in tracebacks. New in version 3.5.

unittest.TestResult.testsRun

testsRun The total number of tests run so far.

unittest.TestResult.unexpectedSuccesses

unexpectedSuccesses A list containing TestCase instances that were marked as expected failures, but succeeded.

unittest.TestResult.wasSuccessful()

wasSuccessful() Return True if all tests run so far have passed, otherwise returns False. Changed in version 3.4: Returns False if there were any unexpectedSuccesses from tests marked with the expectedFailure() decorator.

unittest.TestResult.stopTestRun()

stopTestRun() Called once after all tests are executed. New in version 3.1.

unittest.TestResult.startTestRun()

startTestRun() Called once before any tests are executed. New in version 3.1.