🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

AutoPkgTest to run Doctest on installed Python modules (was: AutoPkgTest fails to copy the Python files to test environment)

#21
From: Ben Finney
Date: Tue, 13 Oct 2026 09:50
71 lines
4917 bytes
--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Andrey Rakhmatullin <wrar@debian.org> writes:

> I think you need to point autopkgtest to the installed file explicitly
> (you either failed to mention that the only tests in the package are
> doctests in the actual module or missed that fact yourself).

Thank you both; yes, I knew that Doctest expects to find and read the
Python module files directly, and that AutoPkgTest expects to test the
installed Python package. But I had not made the connection between
them, that they are therefore in conflict.

This makes sense of the test suite failure.


Jeroen Ploemen <jcfp@debian.org> writes:

> IIRC "testsuite: autopkgtest-pkg-pybuild" cannot handle doctests
> automagically, so you probably need a custom test setup.

That's a disappointment; I hope that can be rectified in a general way
for all Debian Python packages that have Doctests to run. But for now,
yes I agree that a custom AutoPkgTest suite is the most direct way to
get it all working.

> See jaraco.text and jaraco.context for ways to hack things into
> place. Neither will win a beauty contest, but it works.

Thank you, I have looked at those and adapted some other custom
AutoPkgTest suites I had written.

I now have a custom AutoPkgTest that looks to the installed Python
modules and runs the Doctests found there. It is passing that step now.


This has been helpful. Yet I am still interested to know of plans to get
a general solution for AutoPkgTest to run Doctest on the installed
Python modules.

=2D-=20
 \     =E2=80=9CI must have a prodigious quantity of mind; it takes me as m=
uch |
  `\   as a week sometimes to make it up.=E2=80=9D =E2=80=94Mark Twain, _Th=
e Innocents |
_o__)                                                          Abroad_ |
Ben Finney <bignose@debian.org>

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

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

iQJHBAEBCAAxFiEEXfQ3Ydd+6BMR2Ur+B+hY8vqvVjgFAmrN/MITHGJpZ25vc2VA
ZGViaWFuLm9yZwAKCRAH6Fjy+q9WOHILD/9XZIpGmg8vCQ8Q6YL0r/8ya/JGw+cr
fG6X/yu1Zzse5ZPxSmRsjsl9s6DBfiC3n3E/SohF8OJYNu+tw7LQNGk/FqWx//dp
dmhqEIb7U/j7hBBFiSjkIh5OcXVc6meC6h1I8OUvxV+BKTz2FjZGV+5iZ7Nhe+vC
N+vEZI4FpjChvJ+cByUAL+PaEDnhK6m096ktDeu31KKub0kOB1/JzPuJ0DCHVm2F
TF3LnrYnecADnXXfi8W/HqidVXAefmPAzWe91ScWPAyZBm0KfMOyrPQjoxzlXj74
CulasPuHIc4jgLlwcOL3jT0Bfsa8EQCtdmjP2cbXWyrFMK3Yi83ZkvAgNWPTH5Oe
JQOpytB9V4b3NsFv2tWMHd3bkRE9njS+PxOCX7G4CTPT25y1ucX4m3/ZbrAA3DY7
fhvnMUVbNKPtpyvXdvY3o6D/1yyKuRUOHTWg5X+ucbL1FRPs6L6JYMdtm3rj2m+r
dk64081Z6aF1coEi4mMSaPorwaGXHpKvgLN9Eaq2DnImtXwgmCJhuTAQE8GMM/dZ
RC/vpPTES1HUv8MKbcvOkJgJhBMkYNZUqPhatYM7SrvMY8+GNmyxkypcD3V/HMp5
4TqTwBfNK0o8qzjzL4eYfOg05RlInFviV+iW0xB1BNuokYeunCGLRgU5tEgfYI+K
BienQ+QnxXEDuA==
=Mroh
-----END PGP SIGNATURE-----
--=-=-=--
Technical Details
Message-ID: <NNHiV-5f4K-1@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
References: <NNcoN-4YEM-1@gated-at.bofh.it> <NNiaR-51N7-7@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: Ben Finney <bignose@debian.org>
Newsgroups: linux.debian.maint.python
Subject: AutoPkgTest to run Doctest on installed Python modules (was: AutoPkgTest fails to copy the Python files to test environment)
Date: Tue, 13 Oct 2026 11:50:01 +0200
Message-ID: <NNHiV-5f4K-1@gated-at.bofh.it>
References: <NNcoN-4YEM-1@gated-at.bofh.it> <NNiaR-51N7-7@gated-at.bofh.it>
X-Mailbox-Line: From debian-python-request@lists.debian.org  Tue Oct 13 09:41:45 2026
Old-Return-Path: <debian-python@m.gmane-mx.org>
X-Amavis-Spam-Status: No, score=-1.651 tagged_above=-10000 required=5.3
 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249]
 autolearn=no autolearn_force=no
X-Policyd-Weight: using cached result; rate: -4.6
X-Injected-Via-Gmane: http://gmane.org/
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
	micalg=pgp-sha256; protocol="application/pgp-signature"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:0K1knfeBQjpkpshmKWDJyq6bSKY=
X-Public-Key-ID: 0xAC128405
X-Public-Key-Fingerprint: 517C F14B B2F3 98B0 CB35  4855 B8B2 4C06 AC12 8405
X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-pubkey.asc
X-Post-From: Ben Finney <bignose+hates-spam@benfinney.id.au>
X-Mailing-List: <debian-python@lists.debian.org> archive/latest/24125
List-ID: <debian-python.lists.debian.org>
List-URL: <https://lists.debian.org/debian-python/>
List-Archive: https://lists.debian.org/msgid-search/87wlrmrl8d.fsf_-_@benfinney.id.au
Approved: robomod@news.nic.it
Lines: 71
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Tue, 13 Oct 2026 20:41:22 +1100
X-Original-Message-ID: <87wlrmrl8d.fsf_-_@benfinney.id.au>
X-Original-References: <875wz7u4rc.fsf@benfinney.id.au>
	<20261012065551.32714c0e@debian.org>