[Twisted-Python] Re: Several Trial test suites
mg at daimi.au.dk
Wed Feb 13 02:53:25 EST 2008
"Jonathan Lange" <jml at mumak.net> writes:
> I'm not sure I understand your problem entirely, but I'll let you
> know what I do.
Yeah, I guess I was a bit vague -- I was just wondering how best to
structure many tests so that I have good flexibility over what to run
and when to run it.
> My code lives in a package called 'foo'. Underneath that I have a
> package called 'tests' that contains all my tests as 'test_*.py'
> files. 'trial foo' runs all the tests.
> If I wanted to have two different suites, say for unit tests and
> integration tests, I might make another package beneath 'foo' called
> 'integrationtests'. If I felt a bit crazy that day, I might instead
> move all of my unit tests to foo/tests/unit/ and all of my
> integration tests to foo/tests/integration/.
That is a good idea, I think I'll group my tests similarly so that I
can easily run all tests or just selected subsets.
> The important things to remember are:
> - Trial recurses down the Python module/package tree and treats
> anything called 'test_*' as a possible location for tests.
> - You can specify any fully-qualified Python name on the command line.
> - There is no option to specifically exclude certain tests.
Okay, that was what I initially sought for. Thanks for the input!
VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multi-Party Computation) to Python. See: http://viff.dk/.
More information about the Twisted-Python