🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#70
From: Nicholas D Steeves
Date: Sun, 15 Nov 2026 01:40
69 lines
4625 bytes
--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hello Andrey,

Thank you for such a quick reply!  Mine follows in-line:

Andrey Rakhmatullin <wrar@debian.org> writes:

> On Sat, Nov 14, 2026 at 05:26: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 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=20
> args to PYBUILD_TEST_ARGS, the same ones the upstream calls pytest with=20
> (remember that upstreams don't normally run tests by running pytest=20
> without args as we do, they use something like tox or hardcode pytest=20
> commands in their CI). If the upstream doesn't support it (e.g. it needs=
=20
> some project-level coverage config to make sense, or it needs direct=20
> 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?

Cheers,
Nicholas

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

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

iQJEBAEBCgAuFiEE4qYmHjkArtfNxmcIWogwR199EGEFAmr5CwoQHHN0ZW5AZGVi
aWFuLm9yZwAKCRBaiDBHX30QYQgzD/oDL02UK4fBaTrrrM5TmfowyTrtYdnaFhru
77/luRJiDCH7hmsnHfT+OuYbmyYsePoMmLUtAecQR4AwEuIo7hGMzj33YoDSIdTb
AkneLcB0xeRCs+TirkHAgphfz6Ti9PAxsHOABWfp+o/BXF4dUPyH/TIIFtGxF4aK
1apcg59zAaUsmzQmaaYLkAxkHyZ0y8GjPkCOc6QmAeI0wJtgr4uqwWsmmSkzSPgU
XrkWlRu7Df+1bRGjiVGHCU7Ru4zfpFDNF9Uq8TdjQx7ZmFzZBS1uJHSebHfnGexE
YRV9Yj2d3cx7pHvypR5jZOnvjUdMZNQSPC+zPApmwLRwh7LMB3q4m2lMzxtpMIJP
BBDVxC5JlxrLg6Rp/uZUsSciEkCwG/dIBAtRjAZjdsuHGqoHjeHClS2Js/6lKTj1
g3OUb90KoXvanlTx9ev7gAf4YXR0jgGzTnHBL/subPlOyKeDZ/3a4BCvKGCWXnRj
WeR5E5CGH15xHkcnYIHz94zdYAgr8Gp9zXvABuqlrvte0nHadr7zKfQAYvfi70a/
O340jrX0knV93rDH+hcDEkiX8blxUK+q43yQi2jPbdUpSmisCZdtF2Zt9U24qwyL
1u5+XAaLnPlt6kX5VcAI8w4rgF/iSb0+VgSJ/bndUp2bSU1e3u/xCZlR10LckuAZ
gktrPs58fg==
=nPwi
-----END PGP SIGNATURE-----
--=-=-=--
Technical Details
Message-ID: <NZxnP-bWEj-5@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news-ams.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
References: <NZupX-bV3Y-5@gated-at.bofh.it> <NZuJk-bVcf-47@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!weretis.net!feeder8.news.weretis.net!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: Nicholas D Steeves <sten@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 02:40:01 +0100
Message-ID: <NZxnP-bWEj-5@gated-at.bofh.it>
References: <NZupX-bV3Y-5@gated-at.bofh.it> <NZuJk-bVcf-47@gated-at.bofh.it>
X-Original-To: Andrey Rakhmatullin <wrar@debian.org>, debian-python@lists.debian.org
X-Mailbox-Line: From debian-python-request@lists.debian.org  Sun Nov 15 01:30:05 2026
Old-Return-Path: <sten@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; boundary="=-=-=";
	micalg=pgp-sha512; protocol="application/pgp-signature"
X-Debian-User: sten
X-Mailing-List: <debian-python@lists.debian.org> archive/latest/24190
List-ID: <debian-python.lists.debian.org>
List-URL: <https://lists.debian.org/debian-python/>
List-Archive: https://lists.debian.org/msgid-search/87h5hizxth.fsf@navis.mail-host-address-is-not-set
Approved: robomod@news.nic.it
Lines: 69
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Sat, 14 Nov 2026 20:29:46 -0500
X-Original-Message-ID: <87h5hizxth.fsf@navis.mail-host-address-is-not-set>
X-Original-References: <87ld6vyrq1.fsf@navis.mail-host-address-is-not-set>
 <avjjx8wEIDjOxBhP@belkar.wrar.name>