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


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

Re: pybuild and testing pytest plugins

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Piotr Ożarowski <piotr@debian.org>
Newsgroups linux.debian.maint.python
Subject Re: pybuild and testing pytest plugins
Date Mon, 14 Jan 2019 12:40:01 +0100
Message-ID <xg8KZ-3ak-1@gated-at.bofh.it> (permalink)
References <xfTLX-2hA-5@gated-at.bofh.it> <xg5N8-1nN-5@gated-at.bofh.it>
X-Mailbox-Line From debian-python-request@lists.debian.org Mon Jan 14 11:36:17 2019
Old-Return-Path <piotr@ozarowski.pl>
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, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham autolearn_force=no
X-Policyd-Weight using cached result; rate: -4.6
Mail-Followup-To debian-python@lists.debian.org
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent NeoMutt/20180223
X-Mailing-List <debian-python@lists.debian.org> archive/latest/16700
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
List-Archive https://lists.debian.org/msgid-search/20190114113602.cwm4wes65inq2xgm@sar0.p1otr.com
Approved robomod@news.nic.it
Lines 16
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Mon, 14 Jan 2019 12:36:02 +0100
X-Original-Message-ID <20190114113602.cwm4wes65inq2xgm@sar0.p1otr.com>
X-Original-References <alpine.DEB.2.21.1901131418140.7835@bear.techie.net> <56e17e6f-9d96-1ba9-91af-57336f35c77e@bloom.re>
Xref csiph.com linux.debian.maint.python:11247

Show key headers only | View raw


> Conceptually I think it's more relevant to override dh_auto_test. To make
> sure pytest will register the plugin one may tweak the $PYTHONPATH. That's
> the approach I followed in pytest-flask, see [1].

> [1] https://salsa.debian.org/python-team/modules/pytest-flask/blob/debian/master/debian/rules

while tests are run in build target (not my choice, I'd check installed files)
I strongly advise to *not* use source files (i.e. "PYTHONPATH=$(CURDIR)")
in dh_auto_test, especially if you build an extension. pybuild changes
directory for a reason.

If you need some files from source directory during tests, please list
them in debian/pybuild.testfiles file and pybuild will copy them to
build directory (and remove after tests). See pybuild manpage for more info.
-- 
GPG: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645

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


Thread

pybuild and testing pytest plugins Scott Talbert <swt@techie.net> - 2019-01-13 20:40 +0100
  Re: pybuild and testing pytest plugins Alexandros Afentoulis <alexaf@bloom.re> - 2019-01-14 09:30 +0100
    Re: pybuild and testing pytest plugins Piotr Ożarowski <piotr@debian.org> - 2019-01-14 12:40 +0100

csiph-web