class documentation

class TrialRunner: (source)

View In Hierarchy

A specialised runner that the trial front end uses.

Method run Run the test or suite and return a result object.
Method runUntilFailure Repeatedly run test until it fails.
Constant DEBUG Undocumented
Constant DRY_RUN Undocumented
Instance Variable debugger In debug mode, an object to use to launch the debugger.
Instance Variable log An object to give to the reporter to use as a log publisher.
Instance Variable logfile The path to the file to write the test run log.
Instance Variable mode Either None for a normal test run, TrialRunner.DEBUG for a run in the debugger, or TrialRunner.DRY_RUN to collect and report the tests but not call any of them.
Instance Variable profile True to run the tests with a profiler enabled.
Instance Variable reporterFactory A callable to create a reporter to use.
Instance Variable stream The file to report results to.
Instance Variable uncleanWarnings True to report dirty reactor errors as warnings, False to report them as test-failing errors.
Instance Variable workingDirectory A path template to a directory which will be the process's working directory while the tests are running.
Property rterrors Undocumented
Property tbformat Undocumented
Method _makeResult Undocumented
Method _runWithoutDecoration Private helper that runs the given test but doesn't decorate it.
Instance Variable _exitFirst True to stop after the first failed test. False to run the whole suite.
Instance Variable _forceGarbageCollection True to perform a full garbage collection at least after each test. False to let garbage collection run only when it normally would.
Instance Variable _realTimeErrors True if errors should be reported as they happen. False if they should only be reported at the end of the test run in the summary.
Instance Variable _tracebackFormat A format name to use with Failure for reporting failures.

Run the test or suite and return a result object.

Repeatedly run test until it fails.

Undocumented

Value
'debug'

Undocumented

Value
'dry-run'

In debug mode, an object to use to launch the debugger.

An object to give to the reporter to use as a log publisher.

The path to the file to write the test run log.

Either None for a normal test run, TrialRunner.DEBUG for a run in the debugger, or TrialRunner.DRY_RUN to collect and report the tests but not call any of them.

True to run the tests with a profiler enabled.

A callable to create a reporter to use.

The file to report results to.

uncleanWarnings: bool = (source)

True to report dirty reactor errors as warnings, False to report them as test-failing errors.

workingDirectory: str = (source)

A path template to a directory which will be the process's working directory while the tests are running.

Undocumented

Undocumented

def _makeResult(self) -> itrial.IReporter: (source)

Undocumented

def _runWithoutDecoration(self, test: Union[pyunit.TestCase, pyunit.TestSuite], forceGarbageCollection: bool = False) -> itrial.IReporter: (source)

Private helper that runs the given test but doesn't decorate it.

_exitFirst: bool = (source)

True to stop after the first failed test. False to run the whole suite.

_forceGarbageCollection: bool = (source)

True to perform a full garbage collection at least after each test. False to let garbage collection run only when it normally would.

_realTimeErrors: bool = (source)

True if errors should be reported as they happen. False if they should only be reported at the end of the test run in the summary.

_tracebackFormat: str = (source)

A format name to use with Failure for reporting failures.