[TIP] including (or not) tests within your package

Jorge Vargas jorge.vargas at gmail.com
Tue Jul 27 06:58:23 PDT 2010


On Jul 26, 2010 8:19 PM, "Alfredo Deza" <alfredodeza at gmail.com> wrote:

> A few weeks ago in our local Python meeting someone mentioned what a drag
> was to (most of the time) have to download
> the source for a package they have just installed to run the tests because
> the 'test(s)' directory was not included at the time
> of installation.
>
> Some packages include them (like unittest2) and some (most?) don't.
>
> What do you guys feel about including the test directory within your
package
> so it is included at the time of installation?
>
> I'm gearing towards including them, but wanted to hear your opinion about
> it.

Speaking from my experience from framework development the general consensus
is that test-in-packages make things more complicated, as complex packages
tend to have additional test dependencies and sometimes you need a special
setup for some of them and tests just bloat the userspace if they are
distributed together.

Personally other than running on other platforms/setups the core team lacks
I don't see any benefit from having the tests in package. At worst of any of
those tests fails under some obscure situation they should be catch by the
build/release process.

And if you as an end user are submitting a patch and want to run the test, I
expect you to have a fork or checkout, instead of a plain old patch which
means you are downloding the whole thing anyway.

My 0.02cents
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20100727/7c9ae0a8/attachment-0001.htm>


More information about the testing-in-python mailing list