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

Tim Smith tim at tim-smith.us
Tue Oct 6 15:05:56 CEST 2015


On Tue, Oct 6, 2015 at 5:35 AM,  <distutils-sig-request at python.org> wrote:
> On Tue, 6 Oct 2015 11:30:00 +0300
> Ionel Cristian M?rie? <contact at ionelmc.ro> wrote:
>> On Tue, Oct 6, 2015 at 10:51 AM, Antoine Pitrou <solipsis at pitrou.net> wrote:
>>
>> > They should be inside the module. That way, you can check an installed
>> > module is ok by running e.g. "python -m mypackage.tests". Any other
>> > choice makes testing installed modules more cumbersome.
>> >
>>
>> ?Does that really make sense? I haven't heard of any user actually running
>> tests that way.

Numeric computing may be a special case because of its sensitivity to
compiler/BLAS interactions but numpy and scipy support e.g.
`numpy.test()` and Homebrew has received bug reports from people
running them and getting unexpected results so I believe this is
practiced and useful in some domains.

Tim


More information about the Distutils-SIG mailing list