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


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

Re: pybuild and testing pytest plugins

Path csiph.com!weretis.net!feeder4.news.weretis.net!news.albasani.net!news.mixmin.net!news.unit0.net!newsfeed.CARNet.hr!news.spin.it!bofh.it!news.nic.it!robomod
From Alexandros Afentoulis <alexaf@bloom.re>
Newsgroups linux.debian.maint.python
Subject Re: pybuild and testing pytest plugins
Date Mon, 14 Jan 2019 09:30:02 +0100
Message-ID <xg5N8-1nN-5@gated-at.bofh.it> (permalink)
References <xfTLX-2hA-5@gated-at.bofh.it>
X-Original-To debian-python@lists.debian.org
X-Mailbox-Line From debian-python-request@lists.debian.org Mon Jan 14 08:27:09 2019
Old-Return-Path <alexaf@bloom.re>
X-Amavis-Spam-Status No, score=-7 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, LDO_WHITELIST=-5] autolearn=ham autolearn_force=no
X-Policyd-Weight using cached result; rate: -4.6
X-Greylist delayed 554 seconds by postgrey-1.36 at bendel; Mon, 14 Jan 2019 08:27:00 UTC
MIME-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Language en-US
Content-Transfer-Encoding 8bit
Authentication-Results ORIGINATING; auth=pass smtp.auth=alexaf@bloom.re smtp.mailfrom=alexaf@bloom.re
X-Mailing-List <debian-python@lists.debian.org> archive/latest/16699
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
List-Archive https://lists.debian.org/msgid-search/56e17e6f-9d96-1ba9-91af-57336f35c77e@bloom.re
Approved robomod@news.nic.it
Lines 31
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Mon, 14 Jan 2019 10:17:37 +0200
X-Original-Message-ID <56e17e6f-9d96-1ba9-91af-57336f35c77e@bloom.re>
X-Original-References <alpine.DEB.2.21.1901131418140.7835@bear.techie.net>
Xref csiph.com linux.debian.maint.python:11246

Show key headers only | View raw


On 1/13/19 9:23 PM, Scott Talbert wrote:
> When packaging a pytest plugin and wanting to run the plugin's unit 
> tests during the build process, the plugin usually has to be installed 
> before running the tests, otherwise pytest cannot find the plugin.  This 
> seems to require workarounds such as this [1].
> 
> Is there any way to avoid this with pybuild or is such a workaround 
> really necessary?
> 
> Thanks,
> Scott
> 
> [1] 
> https://salsa.debian.org/python-team/modules/pytest-xdist/blob/debian/master/debian/rules#L12 
> 
> 
> 

Hi!

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].

Not sure if this is a workaround too though :)

Cheers,
Alex

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

Back to linux.debian.maint.python | Previous | Next — Previous in thread | Next 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