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

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


On Tue, Oct 6, 2015 at 10:20 AM, Glyph Lefkowitz <glyph at twistedmatrix.com>
wrote:

> If you put your tests outside your package, then you can't install the
> tests for two packages simultaneously, because everyone's tests are just in
> the top-level package "tests".  This tends to infest the whole package,
> since then tests import things from each other using 'from tests import
> ...'.  This is recommended by the hitchhiker's guide, and seconded by <
> http://as.ynchrono.us/2007/12/filesystem-structure-of-python-project_21.html
> >.
>

​I don't want to be harsh here but arguments would be way more interesting
to discuss, as opposed to giving links to JPC's outdated packaging guide.
He's an exceptional developer but many of the things inside that article
are out of fashion (he disagrees about using console_scripts entrypoints​,
doesn't understand what src is for and so on).

I don't think anyone would ever intentionally put a "tests" package in
site-packages, why would you mention that?



Thanks,
-- 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/0af10f51/attachment.html>


More information about the Distutils-SIG mailing list