<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 6, 2015 at 10:54 AM, Donald Stufft <span dir="ltr"><<a href="mailto:donald@stufft.io" target="_blank">donald@stufft.io</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On October 6, 2015 at 3:21:04 AM, Glyph Lefkowitz (<a href="mailto:glyph@twistedmatrix.com">glyph@twistedmatrix.com</a>) wrote:<br>
> > Inside the package.<br>
><br>
> If you put your tests outside your package, then you can't install<br>
> the tests for two packages simultaneously, because everyone's<br>
> tests are just in the top-level package "tests". This tends to<br>
> infest the whole package, since then tests import things from<br>
> each other using 'from tests import ...'. This is recommended<br>
</span>> by the hitchhiker's guide, and seconded by . <br>
<br>
I dislike putting tests inside the package.<br>
<br>
The supposed benefit is that anyone can run the tests at anytime, but I don't<br>
find that actually true because it means (as someone else pointed out) that you<br>
either have to depend on all your test dependencies or that there is already an<br>
additional step to install them. If you're going to have to locate and install<br>
the test dependencies, then you might as well fetch the tarball with tests as<br>
well.<br>
<br>
Someone suggested setuptools test_requires, but that only functions when you<br>
have a setup.py available and you execute ``setup.py test``. It does not help<br>
you at all once the package is installed and the sdist is gone.<br>
<br>
I also don't think people actually run the tests when they are installed in any<br>
significant number, at least I've never once in my life done it or even had a<br>
desire to do it.<br></blockquote><div><br></div><div>The significant number is not so relevant if you buy the argument that it is useful to downstream packagers: it may be a few users, but those are crucial.<br><br></div><div>I also forgot to mention that the ability to test something without building is crucial when you want to distribute binaries.<br><br></div><div>David<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Some projects have test suites which are significantly large too. The PyCA<br>
cryptography project for instance, has to ship it's vectors as an additional<br>
package to reduce the size of the final build product.<br>
<br>
-----------------<br>
Donald Stufft<br>
PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
Distutils-SIG maillist - <a href="mailto:Distutils-SIG@python.org">Distutils-SIG@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/distutils-sig" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/distutils-sig</a><br>
</div></div></blockquote></div><br></div></div>