[Distutils] Where should I put tests when packaging python modules?

Barry Warsaw barry at python.org
Tue Oct 6 23:31:28 CEST 2015


On Oct 06, 2015, at 11:33 AM, David Cournapeau wrote:

>I would like to hear their rationale before guessing. It is hard for me to
>imagine they would not rather test the binaries rather than from sources.
>Something as simple as making sure you have not forgotten runtime
>dependencies becomes much easier this way.

In Debian we can do both.  It's usually good practice to run the package's
test suite during the build process, on the unbuilt source tree.  That doesn't
work for all packages though (tox comes to mind as a recent example), so we
*also* have a way to run the test suite on a built-and-installed version of
the Debian binary package.  I usually try to at least do an import test in
this phase, so for some like tox, I'll do a more extensive test.

In Ubuntu, failing the built-and-installed test (a.k.a. autopkgtest or DEP-8)
will prevent a package from getting promoted from the -proposed channel to the
release channel, which usually shields end users from seeing broken packages.
Debian doesn't have this gateway in place yet.  There is a way to run those on
a local test build, so that's pretty nice.

Cheers,
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20151006/4f208871/attachment.sig>


More information about the Distutils-SIG mailing list