class documentation
class TrialRunner: (source)
A specialised runner that the trial front end uses.
Method | run |
Run the test or suite and return a result object. |
Method | run |
Repeatedly run test until it fails. |
Constant | DEBUG |
Undocumented |
Constant | DRY |
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 | reporter |
A callable to create a reporter to use. |
Instance Variable | stream |
The file to report results to. |
Instance Variable | unclean |
True to report dirty reactor errors as warnings, False to report them as test-failing errors. |
Instance Variable | working |
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 | _make |
Undocumented |
Method | _run |
Private helper that runs the given test but doesn't decorate it. |
Instance Variable | _exit |
True to stop after the first failed test. False to run the whole suite. |
Instance Variable | _force |
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 | _real |
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 | _traceback |
A format name to use with Failure for reporting failures. |
def runUntilFailure(self, test:
Union[ pyunit.TestCase, pyunit.TestSuite]
) -> itrial.IReporter
:
(source)
¶
Repeatedly run test until it fails.
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.
A path template to a directory which will be the process's working directory while the tests are running.
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.
True to perform a full garbage collection at least after each test. False to let garbage collection run only when it normally would.