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

2015-10-11 Thread Robert Collins
On 10 October 2015 at 21:47, Wichert Akkerman wrote: > Also having test code in the package can be very painful if you use tools > like venusian which scan and try to import all Python files. Even if tests are not in-package, such tools need to cope with extras in general: any

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

2015-10-10 Thread Wichert Akkerman
Also having test code in the package can be very painful if you use tools like venusian which scan and try to import all Python files. Sent from my iPhone > On 09 Oct 2015, at 16:05, Michael Merickel wrote: > > At the pylons project we've had a history of keeping our

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

2015-10-09 Thread Michael Merickel
At the pylons project we've had a history of keeping our tests inside the packages. However, keeping them outside has proven to be nicer in some projects as well. 1) It reduces the size of the binary wheels that do not need to package the tests. 2) It still allows you to run the tests on an

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

2015-10-09 Thread David Wilson
On Tue, Oct 06, 2015 at 09:51:01AM +0200, Antoine Pitrou 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. As Donald mentioned, this

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

2015-10-09 Thread Thomas Güttler
Am 07.10.2015 um 01:14 schrieb David Wilson: > On Tue, Oct 06, 2015 at 09:51:01AM +0200, Antoine Pitrou 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

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

2015-10-09 Thread Chris Barker
On Fri, Oct 9, 2015 at 10:44 AM, Thomas Güttler < guettl...@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

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

2015-10-07 Thread Ionel Cristian Mărieș
On Wed, Oct 7, 2015 at 4:42 PM, Ionel Cristian Mărieș wrote: > On Wed, Oct 7, 2015 at 3:18 PM, Donald Stufft wrote: > >> tox and setup.py test are not really equivalent. There’s no way (to my >> knowledge) to test the item outside of a virtual environment.

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

2015-10-07 Thread Barry Warsaw
On Oct 07, 2015, at 09:46 AM, Ben Finney wrote: >So “I'm a big fan of putting tests inside the [Python] package >[directory]” can't be motivated by “Having the tests there in the >installed package”. The two aren't related, AFAICT. It makes it easier for sure. When the tests are inside the

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

2015-10-07 Thread Wes Turner
On Oct 7, 2015 12:44 AM, "Marius Gedminas" wrote: > > On Tue, Oct 06, 2015 at 05:21:27PM -0400, Barry Warsaw wrote: > > On Oct 06, 2015, at 06:21 AM, Donald Stufft wrote: > > > > >FreeBSD relies on ``python setup.py test`` as it's preferred test invocation, > > >so it apparently

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

2015-10-07 Thread Wes Turner
On Oct 7, 2015 6:58 AM, "Ionel Cristian Mărieș" wrote: > > > On Wed, Oct 7, 2015 at 8:12 AM, Thomas Güttler < guettl...@thomas-guettler.de> wrote: >> >> I thought "easy_install" is a very old and deprecated method. > > > ​Indeed it is. That why people put all sorts of custom

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

2015-10-07 Thread Donald Stufft
On October 7, 2015 at 7:58:55 AM, Ionel Cristian Mărieș (cont...@ionelmc.ro) wrote: > On Wed, Oct 7, 2015 at 8:12 AM, Thomas Güttler > > wrote: > > Why not use `setup.py test`? > > > > Because: > > 1. There's Tox​, which does exactly that, and more. It's maintained. It > gets features. tox

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

2015-10-07 Thread Ionel Cristian Mărieș
On Wed, Oct 7, 2015 at 3:20 PM, Wes Turner wrote: > > 2. The "test" command will install the "test_requires" dependencies as > eggs. You will end up with multiple versions of the same eggs right in your > source checkout. > > * is there no way around this? > * is this

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

2015-10-07 Thread Ionel Cristian Mărieș
On Wed, Oct 7, 2015 at 3:18 PM, Donald Stufft wrote: > tox and setup.py test are not really equivalent. There’s no way (to my > knowledge) to test the item outside of a virtual environment. This is > important for downstreams who want to test that the package build and the >

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

2015-10-07 Thread Ionel Cristian Mărieș
On Wed, Oct 7, 2015 at 6:13 PM, Erik Bray wrote: > > Lets not use `setup.py test`. It's either bad or useless. > > Says who? Many of the projects I'm involved in use `setup.py test` > exclusively and for good reason--they all have C and/or Cython > extension modules that

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

2015-10-07 Thread Erik Bray
On Tue, Oct 6, 2015 at 6:08 PM, Ionel Cristian Mărieș wrote: > > On Wed, Oct 7, 2015 at 12:51 AM, Ben Finney > wrote: >> >> I think the above describes the standard way of declaring the test >> runner: The ‘setup.py test’ command. >> >> Now, I

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

2015-10-07 Thread Ionel Cristian Mărieș
On Wed, Oct 7, 2015 at 6:37 PM, Erik Bray wrote: > Which, incidentally, is a great reason for installable tests :) > Not really. Doesn't matter where you have the tests. It matters where you have the code being tested. Tests being installed is a mere consequence of the

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

2015-10-07 Thread Erik Bray
On Wed, Oct 7, 2015 at 11:31 AM, Ionel Cristian Mărieș wrote: > > On Wed, Oct 7, 2015 at 6:13 PM, Erik Bray wrote: >> >> > Lets not use `setup.py test`. It's either bad or useless. >> >> Says who? Many of the projects I'm involved in use `setup.py

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

2015-10-07 Thread Barry Warsaw
On Oct 07, 2015, at 08:18 AM, Donald Stufft wrote: >tox and setup.py test are not really equivalent. There’s no way (to my >knowledge) to test the item outside of a virtual environment. This is >important for downstreams who want to test that the package build and the >tests successfully are

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

2015-10-07 Thread Barry Warsaw
On Oct 07, 2015, at 08:35 AM, Marius Gedminas wrote: >I have hopes for 'tox.ini' becoming the standard way to test a Python >project. As do I, modulo outliers of course. I'd like to see 90% of PyPI packages have a tox.ini. Cheers, -Barry pgpxJ0ovIWbuL.pgp Description: OpenPGP digital

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

2015-10-06 Thread Thomas Güttler
Am 07.10.2015 um 00:08 schrieb Ionel Cristian Mărieș: > On Wed, Oct 7, 2015 at 12:51 AM, Ben Finney > wrote: > >> I think the above describes the standard way of declaring the test >> runner: The ‘setup.py test’ command. >> >> Now, I lament that more Python projects

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

2015-10-06 Thread Marius Gedminas
On Tue, Oct 06, 2015 at 05:21:27PM -0400, Barry Warsaw wrote: > On Oct 06, 2015, at 06:21 AM, Donald Stufft wrote: > > >FreeBSD relies on ``python setup.py test`` as it's preferred test invocation, > >so it apparently doesn't find it useful either. > > Oh how I wish there was a standard way to

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

2015-10-06 Thread Jeremy Stanley
On 2015-10-06 15:10:59 +0100 (+0100), Paul Moore wrote: [...] > That's 25%, which is certainly higher than I would have > guessed. Of course, the implication is that 75% (or 54% in David's > case) use test suites *not* installed with the package :-) [...] It seems rather optimistic to assume that

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

2015-10-06 Thread Antoine Pitrou
On Tue, 6 Oct 2015 09:33:03 -0400 Donald Stufft wrote: > On October 6, 2015 at 9:08:12 AM, Antoine Pitrou (solip...@pitrou.net) wrote: > > On Tue, 6 Oct 2015 08:57:12 -0400 > > Donald Stufft wrote: > > > > > > It doesn't really make experimenting in a VCS any harder, since all

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

2015-10-06 Thread Erik Bray
On Tue, Oct 6, 2015 at 8:34 AM, Ionel Cristian Mărieș wrote: > On Tue, Oct 6, 2015 at 3:13 PM, Antoine Pitrou wrote: >> >> On Tue, 6 Oct 2015 07:07:31 -0400 >> Donald Stufft wrote: >> > >> > I've never, in my entire life [...] >> >> Can

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

2015-10-06 Thread Ben Finney
Thomas Güttler writes: > Where should I put tests when packaging python modules? When packaging them? The same place they go when not packaging them :-) > I want a "cowpath", an "obvious way" For me, the obvious way is to have: > outside the module like this: >

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

2015-10-06 Thread Thomas Güttler
Hi, Where should I put tests when packaging python modules? I want a "cowpath", an "obvious way" Dear experts, please decide: inside the module like this answer: http://stackoverflow.com/questions/5341006/where-should-i-put-tests-when-packaging-python-modules XOR outside the module like

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

2015-10-06 Thread Glyph Lefkowitz
> On Oct 6, 2015, at 12:07 AM, Thomas Güttler > wrote: > > Hi, > > Where should I put tests when packaging python modules? > > I want a "cowpath", an "obvious way" > > Dear experts, please decide: > > inside the module like this answer: > >

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

2015-10-06 Thread Erik Bray
On Tue, Oct 6, 2015 at 12:04 PM, Ionel Cristian Mărieș wrote: > > On Tue, Oct 6, 2015 at 6:33 PM, Erik Bray wrote: >> >> Okay, though, so maybe if there is nothing to offer here but anecdata >> then maybe we should stop acting like there's "one right

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

2015-10-06 Thread Barry Warsaw
On Oct 06, 2015, at 05:54 AM, Donald Stufft wrote: >I dislike putting tests inside the package. I'm a big fan of putting the tests inside the package. I've often looked at a package's tests to get a better understanding of something that was unclear for the documentation, or didn't work the way

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

2015-10-06 Thread Barry Warsaw
On Oct 06, 2015, at 06:21 AM, Donald Stufft wrote: >FreeBSD relies on ``python setup.py test`` as it's preferred test invocation, >so it apparently doesn't find it useful either. Oh how I wish there was a standard way to *declare* how to run the test suite, such that all our automated tools (or

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

2015-10-06 Thread Barry Warsaw
On Oct 06, 2015, at 11:33 AM, David Cournapeau wrote: >I would like to hear their rationale before guessing. It is hard for me to >imagine they would not rather test the binaries rather than from sources. >Something as simple as making sure you have not forgotten runtime >dependencies becomes

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

2015-10-06 Thread Donald Stufft
On October 6, 2015 at 5:20:03 PM, Barry Warsaw (ba...@python.org) wrote: > On Oct 06, 2015, at 05:54 AM, Donald Stufft wrote: > > >I dislike putting tests inside the package. > > I'm a big fan of putting the tests inside the package. I've often looked at a > package's tests to get a better

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

2015-10-06 Thread Barry Warsaw
On Oct 06, 2015, at 08:18 PM, Ben Finney wrote: >Yes, this is a sensible approach: > >* The source package contains all the source files a developer would use > to make further changes and test them. > >* The package for installation contains only those files useful run-time > users, plus

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

2015-10-06 Thread Ben Finney
Barry Warsaw writes: > I'm a big fan of putting the tests inside the package. I've often > looked at a package's tests to get a better understanding of something > that was unclear for the documentation, or didn't work the way I > expected. Having the tests there in the

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

2015-10-06 Thread Barry Warsaw
On Oct 06, 2015, at 05:41 PM, Donald Stufft wrote: >I’m not sure I understand what you’re advocating here, it sounds like you >want your tests at something like mycoolproject/tests so that they are >importable from mycoolproject.tests… but then you talk about symmetry with >docs/ and tests/ which

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

2015-10-06 Thread Barry Warsaw
On Oct 07, 2015, at 08:54 AM, Ben Finney wrote: >Barry Warsaw writes: > >> I'm a big fan of putting the tests inside the package. I've often >> looked at a package's tests to get a better understanding of something >> that was unclear for the documentation, or didn't work the

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

2015-10-06 Thread Barry Warsaw
On Oct 06, 2015, at 10:44 AM, Antoine Pitrou wrote: >Doesn't / didn't setuptools have something called test_requires? Since I pretty much use tox everywhere these days, I've taken to defining test requirements in my tox.ini rather than my setup.py. Cheers, -Barry pgpDfbZCf3GwZ.pgp

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

2015-10-06 Thread Ionel Cristian Mărieș
On Tue, Oct 6, 2015 at 11:54 PM, Erik Bray wrote: > Skimming back through the rest of the thread I don't see too much > support for 1). The only argument against it is the need for > specifying dependencies, etc., which really only impacts developers so > long as the

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

2015-10-06 Thread Ben Finney
Barry Warsaw writes: > On Oct 06, 2015, at 06:21 AM, Donald Stufft wrote: > > >FreeBSD relies on ``python setup.py test`` as it's preferred test > >invocation > > Oh how I wish there was a standard way to *declare* how to run the > test suite, such that all our automated tools

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

2015-10-06 Thread Antoine Pitrou
On Wed, 7 Oct 2015 00:47:31 +0300 Ionel Cristian Mărieș wrote: > On Tue, Oct 6, 2015 at 11:54 PM, Erik Bray wrote: > > > Skimming back through the rest of the thread I don't see too much > > support for 1). The only argument against it is the need for

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

2015-10-06 Thread Barry Warsaw
On Oct 07, 2015, at 08:51 AM, Ben Finney wrote: >I think the above describes the standard way of declaring the test >runner: The ‘setup.py test’ command. > >Now, I lament that more Python projects don't *conform to* that >standard, but at least it exists. It's *a* standard but not *the*

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

2015-10-06 Thread Ionel Cristian Mărieș
On Wed, Oct 7, 2015 at 12:51 AM, Ben Finney wrote: > I think the above describes the standard way of declaring the test > runner: The ‘setup.py test’ command. > > Now, I lament that more Python projects don't *conform to* that > standard, but at least it exists. >

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

2015-10-06 Thread Barry Warsaw
On Oct 06, 2015, at 09:51 AM, Antoine Pitrou wrote: >The PyP"A" should definitely fix its sample project to reflect good >practices. Here's my own sample project. There are actually two git branches, one with an extension module and one with pure Python. https://gitlab.com/warsaw/stupid

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

2015-10-06 Thread Carl Meyer
On 10/06/2015 04:04 PM, Antoine Pitrou wrote: [snip] > ...How are tests supposed to be a problem here, while they > usually have so few dependencies of their own? > >> If you have to bend over backwards (to install the test dependencies) > > While some packages may have non-trivial test

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

2015-10-06 Thread Antoine Pitrou
On Tue, 6 Oct 2015 16:16:41 -0600 Carl Meyer wrote: > On 10/06/2015 04:04 PM, Antoine Pitrou wrote: > [snip] > > ...How are tests supposed to be a problem here, while they > > usually have so few dependencies of their own? > > > >> If you have to bend over backwards (to install

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

2015-10-06 Thread Antoine Pitrou
On Tue, 6 Oct 2015 09:07:46 +0200 Thomas Güttler wrote: > > Dear experts, please decide: > > inside the module like this answer: > > > http://stackoverflow.com/questions/5341006/where-should-i-put-tests-when-packaging-python-modules They should be inside the

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

2015-10-06 Thread Paul Moore
On 6 October 2015 at 08:51, Antoine Pitrou 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. One inconvenience with

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

2015-10-06 Thread Ionel Cristian Mărieș
On Tue, Oct 6, 2015 at 10:20 AM, Glyph Lefkowitz wrote: > If you put your tests outside your package, then you can't install the > tests for two packages simultaneously, because everyone's tests are just in > the top-level package "tests". This tends to infest the whole

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

2015-10-06 Thread Ionel Cristian Mărieș
On Tue, Oct 6, 2015 at 10:51 AM, Antoine Pitrou 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

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

2015-10-06 Thread Wes Turner
On Oct 6, 2015 3:17 AM, "Paul Moore" wrote: > > On 6 October 2015 at 08:51, Antoine Pitrou 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 > >

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

2015-10-06 Thread Antoine Pitrou
On Tue, 6 Oct 2015 09:17:22 +0100 Paul Moore wrote: > On 6 October 2015 at 08:51, Antoine Pitrou 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 > >

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

2015-10-06 Thread David Cournapeau
On Tue, Oct 6, 2015 at 9:30 AM, Ionel Cristian Mărieș wrote: > > On Tue, Oct 6, 2015 at 10:51 AM, Antoine Pitrou > wrote: > >> They should be inside the module. That way, you can check an installed >> module is ok by running e.g. "python -m

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

2015-10-06 Thread Ben Finney
Ionel Cristian Mărieș writes: > I've seen some projects that lump up lots of test data and crazy files > in their packages tests and that created install issues. > > On the other hand, if the user really wants to run the tests he can > just get the sources (that would

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

2015-10-06 Thread Wes Turner
On Oct 6, 2015 4:24 AM, "David Cournapeau" wrote: > > > > On Tue, Oct 6, 2015 at 9:30 AM, Ionel Cristian Mărieș wrote: >> >> >> On Tue, Oct 6, 2015 at 10:51 AM, Antoine Pitrou wrote: >>> >>> They should be inside the module. That way,

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

2015-10-06 Thread Donald Stufft
On October 6, 2015 at 3:21:04 AM, Glyph Lefkowitz (gl...@twistedmatrix.com) wrote: > > Inside the package. > > If you put your tests outside your package, then you can't install > the tests for two packages simultaneously, because everyone's > tests are just in the top-level package

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

2015-10-06 Thread Antoine Pitrou
On Wed, 7 Oct 2015 01:44:34 +0300 Ionel Cristian Mărieș wrote: > > That leaves me with 22 packages that need test tools like pytest/nose and > assorted plugins. > [...] > > ​It's double the trouble to find compatible releases. Hmm, are you saying py.test / nose and

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

2015-10-06 Thread Robert Collins
On 6 October 2015 at 23:47, Ionel Cristian Mărieș wrote: > > On Tue, Oct 6, 2015 at 12:51 PM, Wes Turner wrote: >> >> self-testable programs are really ideal (e.g POST power-on self test) >> relevant recent topical discussion of e.g >> CRC and an

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

2015-10-06 Thread Ionel Cristian Mărieș
On Wed, Oct 7, 2015 at 2:23 AM, Robert Collins wrote: > > Hangon, there's clearly a *huge* gap in understanding here. > > pbr does *not* modify *anyones* setup.py output unless its enabled. ​Unless it's >=1.7.0. You can't blame setuptools having entrypoints for pbr

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

2015-10-06 Thread Ionel Cristian Mărieș
On Wed, Oct 7, 2015 at 1:04 AM, Antoine Pitrou wrote: > > ​I think there's some confusion here. The pain point with "inside" tests > is > > exactly the dependencies. > > Is it your personal experience or some theoretical argument you're > making? > I've published about 27

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

2015-10-06 Thread Ben Finney
Barry Warsaw writes: > On Oct 07, 2015, at 08:54 AM, Ben Finney wrote: > > >Barry Warsaw writes: > > > >> I'm a big fan of putting the tests inside the package. I've often > >> looked at a package's tests to get a better understanding of something > >> that

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

2015-10-06 Thread Donald Stufft
On October 6, 2015 at 7:47:16 PM, Ionel Cristian Mărieș (cont...@ionelmc.ro) wrote: > > ​Unless it's >=1.7.0. You can't blame setuptools having entrypoints > for pbr doing weird stuff to distributions by abusing said entry points.  Relax. pbr had a bug, it was acknowledged as a bug and

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

2015-10-06 Thread David Cournapeau
On Tue, Oct 6, 2015 at 10:54 AM, Donald Stufft wrote: > On October 6, 2015 at 3:21:04 AM, Glyph Lefkowitz (gl...@twistedmatrix.com) > wrote: > > > Inside the package. > > > > If you put your tests outside your package, then you can't install > > the tests for two packages

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

2015-10-06 Thread Donald Stufft
On October 6, 2015 at 6:18:32 AM, David Cournapeau (courn...@gmail.com) wrote: > > The significant number is not so relevant if you buy the argument > that it is useful to downstream packagers: it may be a few users, > but those are crucial. > > I also forgot to mention that the ability to test

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

2015-10-06 Thread David Cournapeau
On Tue, Oct 6, 2015 at 11:21 AM, Donald Stufft wrote: > On October 6, 2015 at 6:18:32 AM, David Cournapeau (courn...@gmail.com) > wrote: > > > The significant number is not so relevant if you buy the argument > > that it is useful to downstream packagers: it may be a few users,

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

2015-10-06 Thread Donald Stufft
On October 6, 2015 at 6:33:10 AM, David Cournapeau (courn...@gmail.com) wrote: > On Tue, Oct 6, 2015 at 11:21 AM, Donald Stufft wrote: > > > On October 6, 2015 at 6:18:32 AM, David Cournapeau (courn...@gmail.com) > > wrote: > > > > The significant number is not so relevant if you buy the

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

2015-10-06 Thread Ionel Cristian Mărieș
On Tue, Oct 6, 2015 at 12:51 PM, Wes Turner wrote: > self-testable programs are really ideal (e.g POST power-on self test) > relevant recent topical discussion of e.g > CRC and an optional '-t' preemptive CLI parameter: >

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

2015-10-06 Thread Antoine Pitrou
On Tue, 6 Oct 2015 11:30:00 +0300 Ionel Cristian Mărieș wrote: > On Tue, Oct 6, 2015 at 10:51 AM, Antoine Pitrou wrote: > > > They should be inside the module. That way, you can check an installed > > module is ok by running e.g. "python -m

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

2015-10-06 Thread Donald Stufft
On October 6, 2015 at 7:00:41 AM, Antoine Pitrou (solip...@pitrou.net) wrote: > On Tue, 6 Oct 2015 11:30:00 +0300 > Ionel Cristian Mărieș wrote: > > On Tue, Oct 6, 2015 at 10:51 AM, Antoine Pitrou wrote: > > > > > They should be inside the module. That way, you can check an installed > > >

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

2015-10-06 Thread Antoine Pitrou
On Tue, 6 Oct 2015 08:57:12 -0400 Donald Stufft wrote: > > It doesn't really make experimenting in a VCS any harder, since all you need > to > do first is run ``pip install -e .`` and it will do a development install and > add the src/ directory to sys.path. That means you're

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

2015-10-06 Thread Donald Stufft
On October 6, 2015 at 9:08:12 AM, Antoine Pitrou (solip...@pitrou.net) wrote: > On Tue, 6 Oct 2015 08:57:12 -0400 > Donald Stufft wrote: > > > > It doesn't really make experimenting in a VCS any harder, since all you > > need to > > do first is run ``pip install -e .`` and it will do a

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

2015-10-06 Thread Donald Stufft
On October 6, 2015 at 8:51:30 AM, Antoine Pitrou (solip...@pitrou.net) wrote: > On Tue, 6 Oct 2015 15:34:38 +0300 > Ionel Cristian Mărieș wrote: > > > > Very few > > test runners change the current working directory by default [1], so it's > > better to just get a better project layout.

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

2015-10-06 Thread Nathaniel Smith
On Oct 6, 2015 6:06 AM, "Tim Smith" wrote: > > On Tue, Oct 6, 2015 at 5:35 AM, wrote: > > On Tue, 6 Oct 2015 11:30:00 +0300 > > Ionel Cristian M?rie? wrote: > >> On Tue, Oct 6, 2015 at 10:51 AM, Antoine Pitrou

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

2015-10-06 Thread Ionel Cristian Mărieș
On Tue, Oct 6, 2015 at 3:51 PM, Antoine Pitrou wrote: > The "src" convention is actually terrible when working with Python > code, since suddenly you can't experiment easily on a VCS checkout, you > have to do extra steps and/or write helper scripts for it. > > The fact that

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

2015-10-06 Thread Antoine Pitrou
On Tue, 6 Oct 2015 07:07:31 -0400 Donald Stufft wrote: > > I've never, in my entire life [...] Can I suggest your entire life is an anecdotal data point here? > This is still ignoring the problems of test dependencies Only if your tests have dependencies that runtime doesn't

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

2015-10-06 Thread David Cournapeau
On Tue, Oct 6, 2015 at 1:57 PM, Donald Stufft wrote: > > > On October 6, 2015 at 8:51:30 AM, Antoine Pitrou (solip...@pitrou.net) > wrote: > > On Tue, 6 Oct 2015 15:34:38 +0300 > > Ionel Cristian Mărieș wrote: > > > > > > Very few > > > test runners change the current working

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

2015-10-06 Thread Ionel Cristian Mărieș
On Tue, Oct 6, 2015 at 3:13 PM, Antoine Pitrou wrote: > On Tue, 6 Oct 2015 07:07:31 -0400 > Donald Stufft wrote: > > > > I've never, in my entire life [...] > > Can I suggest your entire life is an anecdotal data point here? > ​Make that two anecdotal

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

2015-10-06 Thread Antoine Pitrou
On Tue, 6 Oct 2015 15:34:38 +0300 Ionel Cristian Mărieș wrote: > > Very few > test runners change the current working directory by default [1], so it's > better to just get a better project layout. pyca/cryptography > is a good example.​

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

2015-10-06 Thread Paul Moore
On 6 October 2015 at 14:51, David Cournapeau wrote: >> Of course, the same argument can be made for installing tests, since it's >> not >> very common. > > > So we can actually get some data here :) > > At Enthought, we support around 400 packages. More than half of them are >

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

2015-10-06 Thread Ionel Cristian Mărieș
On Tue, Oct 6, 2015 at 6:33 PM, Erik Bray wrote: > ​Okay, though, so maybe if there is nothing to offer here but anecdata > then maybe we should stop acting like there's "one right way here". I > have projects that install their test suite and test dependencies > because

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

2015-10-06 Thread Jeremy Stanley
On 2015-10-06 13:47:51 +0300 (+0300), Ionel Cristian Mărieș wrote: [...] > `pbr` just decides to alter your `setup.py sdist/bdist_*` output > without being asked or invoked [...] Assuming you're talking about https://launchpad.net/bugs/1483067 then it was fixed in 1.7.0. If you're still seeing it