twisted.trial.unittest.Tester

Package twisted :: Package trial :: Module unittest :: Class Tester |
[frames | no frames]

## Class Tester

I contain all the supporting machinery for running a single test method.

Method Summary
| `__init__(self, testClass, testCase, method, runner)`
| ``_main`(self)` I actually to the setUp and run the test.
| ``_runPhase`(self, stage, *args, **kwargs)` I run a single phase of the testing process.
| ``cleanUp`(self)` I clean up after the test is run.
| ``getResult`(self)` I return a tuple containing the first result obtained from the test.
| ``run`(self)` I run a single test.
| `setUp_and_test(self)`
| `tearDown(self)`

Method Details

### _main(self) I actually to the setUp and run the test. I only make sense inside _runPhase.

### _runPhase(self, stage, *args, **kwargs) I run a single phase of the testing process. My job is to give meaning to exceptions raised during the phase. I attach the results to the instance member failures.

### cleanUp(self) I clean up after the test is run. This includes making sure there are no pending calls lying around, garbage collecting and flushing errors. This is all to ensure that any errors caused by this tests are caught by this test.

### getResult(self) I return a tuple containing the first result obtained from the test. If the test was successful, this is also the only result.

### run(self) I run a single test. I go through the process of setUp, test, tearDown and clean up for a single test method. I store my results in the class and return self.getResult(). Raises: `KeyboardInterrupt` - If someone hits Ctrl-C

Generated by Epydoc 2.0 on Sat May 15 20:07:42 2004 | http://epydoc.sf.net