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

Ionel Cristian Mărieș contact at ionelmc.ro
Tue Oct 6 10:30:00 CEST 2015

On Tue, Oct 6, 2015 at 10:51 AM, Antoine Pitrou <solipsis at pitrou.net> wrote:

> They should be inside the module. That way, you can check an installed
> module is ok by running e.g. "python -m mypackage.tests". Any other
> choice makes testing installed modules more cumbersome.

​Does that really make sense? I haven't heard of any user actually running
that way. To be honest I haven't ever ran Python's own tests suite as part
of a user installation.

​I've seen some projects that lump up lots of test data and crazy files in
packages tests and that created install issues​ (Pelican is one example,
pretty sure
there are others).

On the other hand, if the user really wants to run the tests he can just
the sources (that would naturally include everything)?

Seems odd to suggest something is a best practice without giving any clue
of how
test dependencies would be managed. Just because CPython does it doesn't
libraries should.

-- Ionel Cristian Mărieș, http://blog.ionelmc.ro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20151006/0361b6c9/attachment-0001.html>

More information about the Distutils-SIG mailing list