[TIP] including (or not) tests within your package
Olemis Lang
olemis at gmail.com
Tue Aug 10 06:42:44 PDT 2010
On Tue, Aug 10, 2010 at 1:54 AM, Fernando Perez <fperez.net at gmail.com> wrote:
> On Mon, Aug 9, 2010 at 10:53 PM, Andrew Bennetts <andrew at bemusement.org> wrote:
>> There's an assumption here that running ‘python ./setup.py test’ will give
>> as accurate results as running tests installed on the system with the rest
>> of the package. I can think of some^Wseveral^Wmany ways that might not be
>> true. Perhaps I'm overly paranoid.
>
> You're not, you're just being minimally cautious against easy to
> encounter disasters. Two common scenarios that justify having tests
> available beyond the setup.py stage:
>
examples are ok ...
[...]
>
> So yes, there's plenty of good reasons to make sure that a normal
> user, post-install phase, can easily and cleanly run your tests and
> copy/paste back a reasonably informative report. We see lots of those
> in the numpy/scipy lists all the time:
>
... but the same may be obtained if you install both (the target
package & test package) in that environment (if that's what you really
want). So I don't think this is a big stopper . I do think that
Andrew is right, and that's mainly why *I know* what *I'd like to do*
, but so far don't do it, because I'm still sooooo lazy ;o)
I insist , do you install `apache2` & mod_* test suites (ok, they are
not always Py apps ...) @ each and every web server you might manage
just because if you find a problem you want to run it's test suite ,
etc, etc ? The answer is *NO*. You can enable logging , you can do
some other things If you want to do that . In this case it seems that
the test suite and the server are two separate projects (httpd and
httpd-test respectively ... CMIIW I'm not an expert in dev-ing
Apache's httpd).
> and they do help tremendously in tracking down bugs that would be
> otherwise a nightmare to even know existed (as they may depend on
> obscure interactions with proprietary C/Fortran compilers, for
> example). There's lots of weird software/hardware combinations out
> there, so having these kinds of 'probes' into the user's system is
> absolutely critical for many projects.
>
Once again , you can get the same results if you distribute your tests
in another package ...
--
Regards,
Olemis.
Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/
Featured article:
More information about the testing-in-python
mailing list