[TIP] including (or not) tests within your package

Barry Warsaw barry at python.org
Thu Jul 29 08:10:56 PDT 2010

On Jul 28, 2010, at 07:36 AM, Olemis Lang wrote:

>This is the typical situation of using tests_require (testing deps) vs
>install_requires (pkg deps) in setuptools . Packages listed using the
>former option are not installed after executing `install` command .
>This only happens if `test` command is executed and thay are not
>already installed ;o)

Sure, the issue of additional dependencies getting pulled in just to run the
tests, can be an important consideration.  I'm personally (in the typical
case) okay with just installing those dependencies, but I get that there will
be exceptions, either because end-users don't want to pull in those
dependencies or for large packages, they can be really numerous or expensive.

I wonder if it will end up kind of like the documentation case.  More
dependencies can get pulled to build the docs (e.g. Sphinx) but after a while
you've pretty much installed everything you're going to care about
(e.g. jinja2 only gets installed once ;).  After that, your cache is nice and
warm and installing a new package with its test dependencies might not
actually end up installing anything new.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20100729/4bc38e0b/attachment.pgp>

More information about the testing-in-python mailing list