Re: running tests against installed version of package

2016-04-06 Thread Piotr Ożarowski
[Thomas Goirand, 2016-04-06] > Don't use py.test-FOO, as this is deprecated. Instead, use something > like this: > > PYTHON3S:=$(shell py3versions -vr) > > override_dh_auto_test: > ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) > @echo "===> Running tests" > set -e ; set -x

Re: running tests against installed version of package

2016-04-05 Thread Thomas Goirand
On 04/02/2016 09:41 AM, Tiago Ilieve wrote: > Thomas, > > On 31 March 2016 at 18:49, Thomas Goirand wrote: >> Most of the time, you get by this doing: >> PYTHONPATH=$(CURDIR) python -m pytest tests > > Awesome tip! Just stumbled up on this one when imports where changed > from

Re: running tests against installed version of package

2016-04-02 Thread Brian May
Tiago Ilieve writes: > I see. Actually I've removed the "override_dh_auto_test"[1] when I > found out[2] that Pybuild can to do this by itself. > > Now I wonder whether this is enough to fit the use case of multiple > Python 3 versions that you mentioned... Yes, I believe

Re: running tests against installed version of package

2016-04-02 Thread Tiago Ilieve
Hi Brian, On 2 April 2016 at 22:32, Brian May wrote: > This will only test the current version of Python 3. Which is OK at the > moment, there is only Python 3.5 > > However it was very useful to have packages run tests against Python 3.5 > while Python 3.4 was still the

Re: running tests against installed version of package

2016-04-02 Thread Brian May
Tiago Ilieve writes: > override_dh_auto_test: > PYTHONPATH=$(CURDIR) py.test > PYTHONPATH=$(CURDIR) py.test-3 This will only test the current version of Python 3. Which is OK at the moment, there is only Python 3.5 However it was very useful to have

Re: running tests against installed version of package

2016-04-02 Thread Piotr Ożarowski
[Thomas Goirand, 2016-04-02] > > this will test python2.7 only > > Running tests with multiple version of Python was out of scope of my > message. it might be out of scope of your message, but during package's build all interpreters ought to be tested > > and will most probably ignore

Re: running tests against installed version of package

2016-04-02 Thread Thomas Goirand
On 04/01/2016 12:13 AM, Piotr Ożarowski wrote: >> Most of the time, you get by this doing: >> PYTHONPATH=$(CURDIR) python -m pytest tests > > this will test python2.7 only Running tests with multiple version of Python was out of scope of my message. > and will most probably ignore extensions,

Re: running tests against installed version of package

2016-04-02 Thread Tiago Ilieve
Thomas, On 31 March 2016 at 18:49, Thomas Goirand wrote: > Most of the time, you get by this doing: > PYTHONPATH=$(CURDIR) python -m pytest tests Awesome tip! Just stumbled up on this one when imports where changed from relative to absolute and this tip properly fixed the

Re: running tests against installed version of package

2016-03-31 Thread Piotr Ożarowski
> > By default pybuild runs tests I think using the source tree. pybuild tells build system to build .py/.so files in temporary directory (with a _stable_ name), copies tests dir there as well, changes current directory to that dir (so that sys.path[0] doesn't point to sources), runs tests and

Re: running tests against installed version of package

2016-03-31 Thread Thomas Goirand
On 03/25/2016 08:17 AM, Brian May wrote: > Hello, > > By default pybuild runs tests I think using the source tree. In most cases, Pybuild isn't very helpful for running tests and fails in the most common traps (like the one I'm solving for you below), which is why I don't really think it's

Re: running tests against installed version of package

2016-03-31 Thread Barry Warsaw
On Mar 26, 2016, at 01:49 PM, Brian May wrote: >Barry Warsaw writes: > >> In some cases, I've just taken to adding DEP-8 tests for those. > >Do you have an example I can look at? Hi Brian. Take a look at tox for example. Cheers, -Barry

Re: running tests against installed version of package

2016-03-25 Thread Ben Finney
Brian May writes: > Ben Finney writes: > > > As another check, you can test the resulting URL with a ‘git clone’ to a > > temporary target directory. > > It doesn't seem to like me today: Alioth is not responding at all, for me at the moment. And

Re: running tests against installed version of package

2016-03-25 Thread Brian May
Ben Finney writes: > As another check, you can test the resulting URL with a ‘git clone’ to a > temporary target directory. It doesn't seem to like me today: % git clone https://anonscm.debian.org/git/python-modules/packages/apscheduler.git Cloning into

Re: running tests against installed version of package

2016-03-25 Thread Ben Finney
Brian May writes: > Ben Finney writes: > > > The “git:” URL method is not encrypted. You should specify the encrypted > > “https:” method in the “VCS-Git” field > > So just to double check, this should solve that right? > > sed

Re: running tests against installed version of package

2016-03-25 Thread Brian May
Ben Finney writes: > The “git:” URL method is not encrypted. You should specify the encrypted > “https:” method in the “VCS-Git” field: > > Vcs-Git: > https://anonscm.debian.org/git/python-modules/packages/apscheduler.git So just to double check, this should

Re: running tests against installed version of package

2016-03-25 Thread Barry Warsaw
On Mar 25, 2016, at 06:17 PM, Brian May wrote: >However I have a package where the tests require the entry points from >setup.py to be configured, the tests fail without this. > >So what is the appropriate way to modify debian/rules to get the tests >to run from the installed version with the

Re: running tests against installed version of package

2016-03-25 Thread Ben Finney
Brian May writes: > Vcs-Git: git://anonscm.debian.org/python-modules/packages/apscheduler.git > Vcs-Browser: > https://anonscm.debian.org/cgit/python-modules/packages/apscheduler.git The “git:” URL method is not encrypted. You should specify the encrypted “https:”