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

Carl Meyer carl at oddbird.net
Wed Oct 7 00:16:41 CEST 2015


On 10/06/2015 04:04 PM, Antoine Pitrou wrote:
[snip]
> ...How are tests supposed to be a problem here, while they
> usually have so few dependencies of their own?
> 
>> If you have to bend over backwards (to install the test dependencies)
> 
> While some packages may have non-trivial test dependencies, usual
> practice is for test suites to require the exact same dependencies as
> the rest of the package, + perhaps a test runner.
> 
> Since we're talking about good practice for the average package, it's
> not very useful to point out that 0.1% of PyPI packages may have
> excruciatingly annoying test dependencies.

I think this discussion could probably do with fewer unsupported
assertions about what is "usual" -- it's clear that experiences in
different parts of the community vary widely.

Speaking personally and anecdotally, I maintain 15 or so projects on
PyPI, and every single one of them has at least three or four test-only
dependencies; not just a test runner, but also testing utilities of one
kind or another (e.g. the mock backport for Python 2). So my personal
percentage of "packages with more than one test-only dependency" is not
0.1%, it's 100%.

I don't have any idea what the real percentage is on PyPI, and wouldn't
hazard a guess. I'm fairly sure you don't know either.

Carl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20151006/95d66dd4/attachment.sig>


More information about the Distutils-SIG mailing list