Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`trial`.`_dist`.`disttrial`.`DistTrialRunner``

class documentation

`class DistTrialRunner: (source)`

View In Hierarchy

A specialized runner for distributed trial. The runner launches a number of local worker processes which will run tests.

Method | `run` | Run a reactor and a test suite.
Async Method | `runAsync` | Spawn local worker processes and load tests. After that, run them.
Method | `runUntilFailure` | Run the tests with local worker processes until they fail.
Method | `writeResults` | Write test run final outcome to result.
Instance Variable | `stream` | stream which the reporter will use.
Async Method | `_driveWorker` | Drive a `LocalWorkerAMP` instance, iterating the tests and calling `run` for every one of them.
Method | `_makeResult` | Make reporter factory, and wrap it with a `DistReporter`.
Method | `_run` | Undocumented
Class Variable | `_logfile` | Undocumented
Class Variable | `_logger` | Undocumented
Class Variable | `_reactor` | Undocumented
Class Variable | `_realTimeErrors` | Undocumented
Class Variable | `_tracebackFormat` | Undocumented
Class Variable | `_uncleanWarnings` | Undocumented
Class Variable | `_workerArguments` | Undocumented
Class Variable | `_workingDirectory` | Undocumented
Instance Variable | `_exitFirst` | ``True`` to stop the run as soon as a test case fails. ``False`` to run through the whole suite and report all of the results at the end.
Instance Variable | `_maxWorkers` | the number of workers to be spawned.
Instance Variable | `_reporterFactory` | the reporter class to be used.

def run(self, test: `Union[TestCase, TestSuite]`) -> `IReporter`: (source)

Run a reactor and a test suite.

Parameters
test:`Union[TestCase, TestSuite]` | The test or suite to run.
Returns
`IReporter` | Undocumented

async def runAsync(self, suite: `Union[TestCase, TestSuite]`, untilFailure: `bool` = False) -> `DistReporter`: (source)

Spawn local worker processes and load tests. After that, run them.

Parameters
suite:`Union[TestCase, TestSuite]` | A test or suite to be run.
untilFailure:`bool` | If `True`, continue to run the tests until they fail.
Returns
`DistReporter` | A coroutine that completes with the test result.

def runUntilFailure(self, test: `Union[TestCase, TestSuite]`) -> `IReporter`: (source)

Run the tests with local worker processes until they fail.

Parameters
test:`Union[TestCase, TestSuite]` | The test or suite to run.
Returns
`IReporter` | Undocumented

def writeResults(self, result): (source)

Write test run final outcome to result.

Parameters
result | A `TestResult` which will print errors and the summary.

stream: `TextIO` = (source)

stream which the reporter will use.

async def _driveWorker(self, result: `DistReporter`, testCases: `Sequence[ITestCase]`, worker: `LocalWorkerAMP`): (source)

Drive a `LocalWorkerAMP` instance, iterating the tests and calling `run` for every one of them.

Parameters
result:`DistReporter` | The global `DistReporter` instance.
testCases:`Sequence[ITestCase]` | The global list of tests to iterate.
worker:`LocalWorkerAMP` | The `LocalWorkerAMP` to drive.
Returns
A coroutine that completes after all of the tests have completed.

def _makeResult(self) -> `DistReporter`: (source)

Make reporter factory, and wrap it with a `DistReporter`.

def _run(self, test: `Union[TestCase, TestSuite]`, untilFailure: `bool`) -> `IReporter`: (source)

Undocumented

_logfile: `str` = (source)

Undocumented

_logger = (source)

Undocumented

_reactor: `IDistTrialReactor` = (source)

Undocumented

_realTimeErrors: `bool` = (source)

Undocumented

_tracebackFormat: `str` = (source)

Undocumented

_uncleanWarnings: `bool` = (source)

Undocumented

_workerArguments: `List[str]` = (source)

Undocumented

_workingDirectory: `str` = (source)

Undocumented

_exitFirst: `bool` = (source)

``True`` to stop the run as soon as a test case fails. ``False`` to run through the whole suite and report all of the results at the end.

_maxWorkers: `int` = (source)

the number of workers to be spawned.

_reporterFactory: `Callable[..., IReporter]` = (source)

the reporter class to be used.