A TestSuite whose run() parallelises.
Method __init__ Create a ConcurrentTestSuite to execute tests returned by make_tests.
Method run Run the tests concurrently.
Method _run_test Undocumented
def __init__(self, make_tests):
Create a ConcurrentTestSuite to execute tests returned by make_tests.
Parametersmake_testsA helper function that should return some number of concurrently executable test suite / test case objects. make_tests must take no parameters and return an iterable of tuples. Each tuple must be of the form (case, route_code), where case is a TestCase-like object with a run(result) method, and route_code is either None or a unicode string.
def run(self, result):

Run the tests concurrently.

This calls out to the provided make_tests helper to determine the concurrency to use and to assign routing codes to each worker.

ConcurrentTestSuite provides no special mechanism to stop the tests returned by make_tests, it is up to the made tests to honour the shouldStop attribute on the result object they are run with, which will be set if the test run is to be aborted.

The tests are run with an ExtendedToStreamDecorator wrapped around a StreamToQueue instance. ConcurrentStreamTestSuite dequeues events from the queue and forwards them to result. Tests can therefore be either original unittest tests (or compatible tests), or new tests that emit StreamResult events directly.

ParametersresultA StreamResult instance. The caller is responsible for calling startTestRun on this instance prior to invoking suite.run, and stopTestRun subsequent to the run method returning.
def _run_test(self, test, process_result, route_code):
Undocumented
API Documentation for testtools, generated by pydoctor at 2015-07-01 16:11:28.