Package twisted :: Package trial :: Module unittest :: Class Tester
[show private | hide private]
[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)
  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)
  _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.

Method Details

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

_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.

Generated by Epydoc 1.1 on Fri Jun 27 03:48:59 2003 http://epydoc.sf.net