[TIP] Guidelines for where to put tests & how to package them

Robert Collins robertc at robertcollins.net
Fri Feb 26 12:41:20 PST 2010


On Fri, 2010-02-26 at 18:29 +0000, Michael Foord wrote:
> 
> Well - the techniques you discuss below work for unittest based tests,
> will they automatically work for doctest tests?

Yes

>  What about other test frameworks?

If it exports a unittest test collection, yes.

> The advantage of having a run module that collects and runs the tests
> is that it is agnostic of which test runner is used (or at least
> allows the *user* to be agnostic, so long as they have the right
> dependencies installed anyway). 

Except they need to know command line options to get JUnit xml out (or
whatever the particular CI tool needs).

The point of the load_tests hook + discover is that with them you have
complete control over collection, regardless of test executor being
chosen: as long as the test executor obeys the protocol.

I think a similar thing should apply here.

-Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20100227/fcac12b5/attachment.pgp>


More information about the testing-in-python mailing list