[TIP] Defining a convention for running tests, #2

Robert Collins robertc at robertcollins.net
Sat Feb 27 15:18:06 PST 2010


On Sat, 2010-02-27 at 22:51 +0000, Michael Foord wrote:
> 
> That leads to an interesting point - what if a package has
> dependencies 
> that are only needed to run tests (like testtools, testresources
> etc). 
> You probably don't want to declare them as requirements but you do
> want 
> to require them somehow. I am discussing now about how packages
> should 
> declare test-only dependencies. 

Packaging systems usually have multiple /sorts/ of dependencies. I sent
this mail
http://lists.usefulinc.com/pipermail/doap-interest/2009-September/000380.html
to the doap list last year. Its a little long. but the core aspect was:
'Then,
A Project Foo->ProjectGroup Bar dependency-relationship has:

A time:
 * build
 * test
 * run
 * supply

It has an presence:
 * Must
 * Should
 * Could
 * Cannot

Together we get:
'To ${time} Foo correctly, ${Bar} ${presence} be present.'
'

So, setup.py should be able to declare:
build time deps - e.g. pyrex/cython
test time deps - e.g. testresources, testscenarios, py.test 
run time deps - e.g. httplib2 

supply time - enhancements to other projects - is kindof weak. As an
example though, consider a package that can plugin to many other things;
it might want to runtime depend on (AnyOf < list >), but make it clear
that its useful to have with all those other things by supplying
whatever their extension points are.

-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/20100228/e76bfa41/attachment.pgp>


More information about the testing-in-python mailing list