[Distutils] Where should I put tests when packaging python modules?
chris.barker at noaa.gov
Fri Oct 9 20:29:53 CEST 2015
On Fri, Oct 9, 2015 at 10:44 AM, Thomas Güttler <
guettliml at thomas-guettler.de> wrote:
> The question remains: If a new comer asks you "How to package my
> python code and its tests?", there should be one default answer
> which works for 80% of all cases.
Should be, maybe -- but clearly there is no consensus as to what the "one"
answer shoudl be.
But I _think_ there are two answers:
1) inside the package, so it can be installed and the tests run on the
2) outside the package, so that potentially large or complex test
requirements are not required for installation.
So the intro docs can lay out those two options, with a bit of text that
helps a newbie make a decision.
from above, -- I think that EITHER option would work fine for 80% of cases.
which makes me think -- why not pick one as the default while clearly
documenting the other.
And despite the fact that I have always used option (2) in my work, I
think, if there is going to be one in the simple example, it should be (1)
-- it's a fine way to get started, and users can move their tests outside
of the package later if they start getting big. As a package grows to that
extent, it will likely need other structural changes anyway.
> I think the confusion gets worse by creating new public accessible
> repos which explain "Hey that's my way to package stupid simple
> python code".
> Thomas Güttler
> Distutils-SIG maillist - Distutils-SIG at python.org
Christopher Barker, Ph.D.
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Distutils-SIG