🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.maint.python
Article #71

Re: best way[s] to run more verbose pytest in dh_auto_test

#71
From: Andrey Rakhmatullin
Date: Sun, 15 Nov 2026 09:30
70 lines
4945 bytes
--raOIj2kEQoia1R65
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Nov 14, 2026 at 08:29:46PM -0500, Nicholas D Steeves wrote:
>>>There doesn't seem to be any documentation on the following, so I think
>>>it's worth having it here on-list, if nowhere else:
>>>
>>>I've been wondering how other developers make pytest run with -v, -vv,
>>>or -vvv
>>
>> You can simply add those to `export PYBUILD_TEST_ARGS=3D` in d/rules.
>
>Don't these replace upstream's tool.pytest.ini_options in from
>pyproject.toml?  I thought that best practises would be something more
>like 'PYBUILD_TEST_ARGS+=3D -vvv'.

I would be really surprised if there was a difference. Are you assuming=20
that the default value of PYBUILD_TEST_ARGS is non-empty?

>>>I also wonder if anything special needs to be done for projects that use
>>>a "coverage" type summary.
>>
>> If the upstream already supports it you need to add explicit pytest-cov
>> args to PYBUILD_TEST_ARGS, the same ones the upstream calls pytest with
>> (remember that upstreams don't normally run tests by running pytest
>> without args as we do, they use something like tox or hardcode pytest
>> commands in their CI). If the upstream doesn't support it (e.g. it needs
>> some project-level coverage config to make sense, or it needs direct
>> coverage calls instead of pytest-cov) I wouldn't bother.
>>
>
>I used your hint about upstream pytest-cov to find that the place
>upstream was enabling it was pyproject.toml -- a nice and simple case.
>I tried patching it here with "-vvv" to see if our pybuild would use
>upstream's tool.pytest.ini_options, and it did.
>
>Why is it better to manually copy and synchronise upstream's
>tool.pytest.ini_options (pyproject.toml) to our PYBUILD_TEST_ARGS
>(d/rules), and then manually keep them in sync?

Well, editing d/rules is almost always preferred to patching upstream=20
sources. But if by copying you mean `addopts` from pyproject.toml are=20
ignored by pybuild, that's unexpected.

--=20
WBR, wRAR

--raOIj2kEQoia1R65
Content-Type: application/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEolIP6gqGcKZh3YxVM2L3AxpJkuEFAmr5eV8ACgkQM2L3AxpJ
kuEfww//arnB0Qvi5VTYsIYiDQzqnAEqINmdDLskikWCUofI72L+ekfK6m9YawVH
gW3HwsoclgbH4ekEE37PyDNTU6GZ40oxldvGZkc05L46XqMiINhxdE2EJLZKu74c
B7WkS+537WlMnyoE9XVORSEmsc3jK23OZVYGabbFhlR5OcqcIbinKAU7nvV3Zxcj
hBT9Y7QhAekWPR85+GkMkBgdIKh53ePo+va+8SM745wG4MDSCfra9m/dqI6UfpCP
+6T1zQIsleVrjFqakUoqSAS/qfyETvNJ0Jwgnn7UZYIikmbNmZQlQdE6+uShSvFk
w0tNueIHyeBxLjsv6BP/ITShhC6nIWSr7D/No+gtsGge09HDg8YZigvi523RzFme
kBvUERMNDZ8IdkUidY5QCqBBKsSAVgflIPiVIBD2XOpQjAyGCi0+GlpdCM1GUB2c
+ihKJzlDECiC+IBLjHsZ4pjnYqeqGMaIH06QG7c48KtER/Kkm0olXpZeLT5YQ3fs
2zq5UuQfrOsmrFZhy8rS/KnVR/ZHZTHSH0Zo6xgi7WNtK9Stmxfnu9qlFbPS2lRz
mT2QiRNvC7ieKYqUqLchIJIY34PA2asyR592X1MSE3pXM6geEdJnw4ypp2/G0UVn
i/i5NykI9dKiGpHGLMJKc09Ulv4xVMIWFdCsIoaE5rTvHQv+RpM=
=h7qo
-----END PGP SIGNATURE-----

--raOIj2kEQoia1R65--
Technical Details
Message-ID: <NZEIF-c0M4-9@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news-ams.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!news.servidellagleba.it!bofh.it!news.nic.it!robomod
References: <NZupX-bV3Y-5@gated-at.bofh.it> <NZuJk-bVcf-47@gated-at.bofh.it> <NZxnP-bWEj-5@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news-ams.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!news.servidellagleba.it!bofh.it!news.nic.it!robomod
From: Andrey Rakhmatullin <wrar@debian.org>
Newsgroups: linux.debian.maint.python
Subject: Re: best way[s] to run more verbose pytest in dh_auto_test
Date: Sun, 15 Nov 2026 10:30:01 +0100
Message-ID: <NZEIF-c0M4-9@gated-at.bofh.it>
References: <NZupX-bV3Y-5@gated-at.bofh.it> <NZuJk-bVcf-47@gated-at.bofh.it> <NZxnP-bWEj-5@gated-at.bofh.it>
X-Original-To: debian-python@lists.debian.org
X-Mailbox-Line: From debian-python-request@lists.debian.org  Sun Nov 15 09:20:46 2026
Old-Return-Path: <wrar@debian.org>
X-Amavis-Spam-Status: No, score=-4.401 tagged_above=-10000 required=5.3
 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_MED=-2.3] autolearn=ham autolearn_force=no
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
	protocol="application/pgp-signature"; boundary="raOIj2kEQoia1R65"
Content-Disposition: inline
X-Debian-User: wrar
X-Mailing-List: <debian-python@lists.debian.org> archive/latest/24191
List-ID: <debian-python.lists.debian.org>
List-URL: <https://lists.debian.org/debian-python/>
List-Archive: https://lists.debian.org/msgid-search/avl5X8o0XE8dEEzf@belkar.wrar.name
Approved: robomod@news.nic.it
Lines: 70
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Sun, 15 Nov 2026 14:20:31 +0500
X-Original-Message-ID: <avl5X8o0XE8dEEzf@belkar.wrar.name>
X-Original-References: <87ld6vyrq1.fsf@navis.mail-host-address-is-not-set>
 <avjjx8wEIDjOxBhP@belkar.wrar.name>
 <87h5hizxth.fsf@navis.mail-host-address-is-not-set>