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

Alfredo Deza alfredodeza at gmail.com
Tue Jul 27 05:46:15 PDT 2010

On Tue, Jul 27, 2010 at 8:37 AM, Marius Gedminas <marius at gedmin.as> wrote:

> On Tue, Jul 27, 2010 at 01:32:20PM +1000, Ben Finney wrote:
> > The trick then becomes management of the build script so that the
> > install step does *not* deploy the tests. Which requires thinking of
> > one's package as a package to be deployed, even though you're deploying
> > it in source form. From that point, it's a matter of learning about
> > Distutils and all the rest.
> Other than wasting a bit of disk space, what are the downsides of
> installing the tests?
> For example, PyGame recently changed their distribution so the
> tests get installed and can be run by any end-user with
>  python -m pygame.tests.__main__
> (I think it's just 'python -m pygame.tests' for Python 2.7 and 3.x)
This is exactly my thinking! When I write tests, I almost always write them
thinking about users running them and how important it is
for users to have this ability so they can report problems easier than:

"Oh, you need to run my tests but first download my source, make sure you
got the same version that is giving you issues, and then untar it and... oh
yes you need this test runner with this version because I am using a
specific test functionality there.... blah blah blah"

But then again... I also think is great to be able to ask these questions
and not assume anything.

> Marius Gedminas
> --
> I'm a shareware signature!  Send $2 if you use me, $10 for a manual.
> Version: GnuPG v1.4.10 (GNU/Linux)
> PWoAn1D42MjiLJuUrOl+25wYUQaTo87B
> =fnFf
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20100727/a4aeb8ba/attachment.htm>

More information about the testing-in-python mailing list