Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #10949

Problem with pybuild and pytest (repost)

Path csiph.com!feeder.erje.net!2.eu.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Ole Streicher <olebole@debian.org>
Newsgroups linux.debian.maint.python
Subject Problem with pybuild and pytest (repost)
Date Fri, 28 Sep 2018 10:30:01 +0200
Message-ID <wCWjT-6z6-5@gated-at.bofh.it> (permalink)
X-Mailbox-Line From debian-python-request@lists.debian.org Fri Sep 28 08:21:09 2018
Old-Return-Path <news@liska.ath.cx>
X-Amavis-Spam-Status No, score=-6.999 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, HEADER_FROM_DIFFERENT_DOMAINS=0.001, LDO_WHITELIST=-5] autolearn=ham autolearn_force=no
X-Policyd-Weight using cached result; rate: -7
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)
MIME-Version 1.0
Content-Type text/plain
Lines 62
X-Mailing-List <debian-python@lists.debian.org> archive/latest/16378
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
List-Archive https://lists.debian.org/msgid-search/87h8ianj4z.fsf@debian.org
Approved robomod@news.nic.it
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Fri, 28 Sep 2018 10:03:40 +0200
X-Original-Message-ID <87h8ianj4z.fsf@debian.org>
Xref csiph.com linux.debian.maint.python:10949

Show key headers only | View raw


Hi,

I already posted this two weeks ago, but didn't get a response yet, and
thus it remains unsolved:

For one of my packages (sunpy), I want to complete the switch to pybuild
by removing the custom (and quite unperfect) dh_override_auto_test rule.

Currently, I have the following lines in d/rules:

override_dh_auto_test:
	python -m pytest sunpy -k "not figure and not online"
	python3 -m pytest sunpy -k "not figure and not online"

This gives successfull tests with the following output in the log:


--------------------------8<-------------------------------------------
   debian/rules override_dh_auto_test
make[1]: Entering directory '/<<PKGBUILDDIR>>'
pyversions: missing X(S)-Python-Version in control file, fall back to debian/pyversions
pyversions: missing debian/pyversions file, fall back to supported versions
pyversions: missing X(S)-Python-Version in control file, fall back to debian/pyversions
pyversions: missing debian/pyversions file, fall back to supported versions
python -m pytest sunpy -k "not figure and not online"
============================= test session starts ==============================
platform linux2 -- Python 2.7.15, pytest-3.6.4, py-1.5.4, pluggy-0.6.0
rootdir: /<<PKGBUILDDIR>>, inifile: setup.cfg
plugins: mock-1.7.1, hypothesis-3.44.1
collected 1448 items / 34 deselected
[...]
--------------------------8<-------------------------------------------


>From the pybuild wiki page, I learned to do instead the override:

export PYBUILD_TEST_ARGS=-k "not figure and not online"

However, then the tests are not found anymore and the test step fails:


--------------------------8<-------------------------------------------
   dh_auto_test -O--buildsystem=pybuild
I: pybuild base:217: cd /build/sunpy-0.9.3/.pybuild/cpython2_2.7_sunpy/build; python2.7 -m pytest -k "not figure and not online"
============================= test session starts ==============================
platform linux2 -- Python 2.7.15+, pytest-3.6.4, py-1.6.0, pluggy-0.6.0
rootdir: /build/sunpy-0.9.3, inifile: setup.cfg
plugins: mock-1.7.1, hypothesis-3.44.1
collected 0 items

========================= no tests ran in 0.00 seconds =========================
E: pybuild pybuild:338: test: plugin distutils failed with: exit code=5: cd /build/sunpy-0.9.3/.pybuild/cpython2_2.7_sunpy/build; python2.7 -m pytest -k "not figure and not online"
dh_auto_test: pybuild --test --test-pytest -i python{version} -p 2.7 returned exit code 13
--------------------------8<-------------------------------------------


I don't understand why the tests fail now? How do I correctly specify
them?

Best regards

Ole

Back to linux.debian.maint.python | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Problem with pybuild and pytest (repost) Ole Streicher <olebole@debian.org> - 2018-09-28 10:30 +0200
  Re: Problem with pybuild and pytest (repost) Piotr Ożarowski <piotr@debian.org> - 2018-09-28 14:10 +0200
    Re: Problem with pybuild and pytest (repost) Ole Streicher <olebole@debian.org> - 2018-09-28 16:10 +0200

csiph-web