🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.maint.python
4 messages
4 total messages Started by Nicholas D Steeves Sat, 14 Nov 2026 22:30
best way[s] to run more verbose pytest in dh_auto_test
#68
Author: Nicholas D Steeves
Date: Sat, 14 Nov 2026 22:30
42 lines
3069 bytes
--=-=-=
Content-Type: text/plain

Hello,

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 to get more useful failure output from their Debian package
builds.  Meanwhile, I'm curious why -vvv isn't the default, because
builds are supposed to be maximally verbose by default, aren't they?

I also wonder if anything special needs to be done for projects that use
a "coverage" type summary.

Please CC me.

Best,
Nicholas

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

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

iQJEBAEBCgAuFiEE4qYmHjkArtfNxmcIWogwR199EGEFAmr44CYQHHN0ZW5AZGVi
aWFuLm9yZwAKCRBaiDBHX30QYbwSD/9saDdCTWm/gfm64z02qD8nVf1zg6NE5I4M
8WC4n5tDHMhpB1OFDZxTFldJGhEIcRY37aewavgRXzaLm1K0PhL/GAvjaTmgPvgY
Jw5yrl7rRDtkmAP++69u3X4mrjbZF8t024dBmtPEc3/uignBESc9CwfweIaq107U
aJan7Z667l8TOTkUhn2xgiiaUNXJUb7VKqKQtnQ46RTENe3V3k16rrHaPjLj5dSJ
RhH5rwoy3LwlsG4EHloZuUoU+EhS6g/RYpOCbzxAmov9kLZ1+BDkI9NINrnJ2Xtf
cPitBnoRB2M4z7vmabAZEaygHpIXfZJMRuB6AAGOUeAuB1KJOJhNUJo0+FWNjrfH
IXsVNgX4atpAOljk1jgLQA01CEigG8GBDpp4sXgQ9/827u+ZKvBJwrb33GLeQvz7
R1pmmSNCgQw0DzZqhkdscYhg5N7QwolypvjWjSFHm8qtVoBWMz+7e5VnBkbM2CdO
IpKMDA+WnghTgI7OuqGEqCcJe0u0kK62FDm8tOXDWlPdWrbprC89wWlIFNuHu+nW
b5BN0lhcbuj7yw38clSGXVE9vMe0nkOzU3X+iReWF2JkY0L3UCiLYalDXK0uBxst
zDl71T87ANz9ZQWkIkname/T7l+z9syIAnirJ04+X33//K0XBbNZrs8OLiEooekh
/PdRN/vXTg==
=ebT4
-----END PGP SIGNATURE-----
--=-=-=--
Re: best way[s] to run more verbose pytest in dh_auto_test
#69
Author: Andrey Rakhmatullin
Date: Sat, 14 Nov 2026 22:50
50 lines
3696 bytes
--5nMpa7YW96LJwIrx
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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.

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


--=20
WBR, wRAR

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

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

iQIzBAABCgAdFiEEolIP6gqGcKZh3YxVM2L3AxpJkuEFAmr448cACgkQM2L3AxpJ
kuENCg/+JWB6SUTOyCFjiYPfuhX6qSjdgCDkF3rEPhvO03CnN6hBXvM3kWBvmlAU
T8yiisDYgn2qLQltJNTErXr513hMAD7suVKvaPsvTsK7gxZAZyZbmEHaJEdAxVCG
dNEZgY0ryFNjl+IfMpKtrtew7n7Pji/DVbGOaYhuAagZpYYid92IL+ZQTt4eMIQx
gAVxFVfFLFhIAzGGq8LTMNVWStgNZVLBgOqyNztHqINDkqKY0m2na3wFQoO4+r2k
wLCkOjaAy4XtZClwVEG1SQdGmSxUGfAIpxIxXb0G2RsXs1lXw7WgL+JuB8vQBdCf
9oOQ+mo6ts5/BAmeTbfpSGVnp7mfRhWt/Dlv+bkHbkMINCyuGdCjU1+pRT6lXHkN
OA7GcMvrrUd8RVnAb1AOGBAdrIwZGPVYsfKaYkM2Bcs1n1V9n2wi/K3KImBSk9vU
ujjq5w+o4sXZulAp1sVR1Xs7kM8UyOGL/V7+r1sQ6JC7W6705dztPpm6EwRcYXVw
O3QF/9VGT95cIZE0IwxQK+L9/oZJ4tWZ9JzPIBaCYwp79KgrgCghup+mLyfehmIc
K/l8/Bpuwj0vxYwNzaX/x1tVnwZQZ5H6V+jXp9erNXbYCDF1j2d2XmMqU09rNeSK
2pp1CTXxBH+w0fu+fw079U+ZKyeYXbZQNTwnisvkCN8vJGeA+p0=
=ILP1
-----END PGP SIGNATURE-----

--5nMpa7YW96LJwIrx--
Re: best way[s] to run more verbose pytest in dh_auto_test
#70
Author: 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-----
--=-=-=--
Re: best way[s] to run more verbose pytest in dh_auto_test
#71
Author: 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--
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads