[Twisted-Python] Trial Test Runner

Ralph Meijer twisted at ralphm.ik.nu
Fri Nov 17 05:11:51 MST 2006


On Fri, 2006-11-17 at 12:57 +0100, Markus Schiltknecht wrote:
> Hi,
> 
> Jean-Paul Calderone wrote:
> > Trial has a command line tool for running suites, "trial".  If that code is
> > in eUnit/test/test_sample.py, then you can try any of these commands:
> 
> Duh! Thank you! I didn't think about a command line tool and was looking 
> in the wrong places.
> 
> Another question: can I somehow nest setUp and tearDown methods? I.e.
> 
> A.setUp:      very general setup, i.e. starting a process needed
> A.test1
> A.test2
> 
> A.B.setUp:    specific setups for B, which depend on A's setup
> A.B.test1
> A.B.tearDown
> 
> A.test3
> A.tearDown:   tear down all the general stuff, i.e. stopping that
>                process

You can use class inheritance. Define A deriving from object, and then B
from A and TestCase, for example.

-- 
Groetjes,

ralphm





More information about the Twisted-Python mailing list