class ParallelTestSuite(unittest.TestSuite):
Run a series of tests in parallel in several processes.
While the unittest module's documentation implies that orchestrating the execution of tests is the responsibility of the test runner, in practice, it appears that TestRunner classes are more concerned with formatting and displaying test results.
Since there are fewer use cases for customizing TestSuite than TestRunner, implementing parallelization at the level of the TestSuite improves interoperability with existing custom test runners. A single instance of a test runner can still collect results from all tests without being aware that they have been run in parallel.
Method | __init__ |
Undocumented |
Method | __iter__ |
Undocumented |
Method | run |
Distribute test cases across workers. |
Instance Variable | buffer |
Undocumented |
Instance Variable | failfast |
Undocumented |
Instance Variable | processes |
Undocumented |
Instance Variable | subsuites |
Undocumented |
Distribute test cases across workers.
Return an identifier of each test case with its result in order to use imap_unordered to show results as soon as they're available.
To minimize pickling errors when getting results from workers:
Even with tblib, errors may still occur for dynamically created exception classes which cannot be unpickled.