Article View: linux.debian.maint.python
Article #22Re: AutoPkgTest to run Doctest on installed Python modules
From: Stuart Prescott
Date: Wed, 14 Oct 2026 05:50
Date: Wed, 14 Oct 2026 05:50
44 lines
6883 bytes
6883 bytes
Hi Ben >> 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. Telling autopkgtest to run the tests against the module as installed is enough; the following works both at build time and at autopkgtest time: export PYBUILD_TEST_ARGS = --pyargs jaraco.logging If you're polishing things in there, there are some left-overs from your previous attempts: - PYBUILD_AFTER_TEST is unnecessary now that you don't have the manual d/*install step, so you can lose a few lines from d/rules. - PYBUILD_SYSTEM is unneeded because that is explicitly what the build dependency on pybuild-plugin-pyproject asks for already. - PYBUILD_INSTALL_ARGS is unneeded (it does nothing in pybuild's pyproject-based workflow) - --test-pytest is unneeded as the explicit build-dep on python3-pytest means the same thing - oldoldstable also satisfies the version constraint for python3-pytest, so unless you are particularly keen on porting to some ancient LTS (that won't have a new enough python3 for this package anyway), you can skip that too. Obviously none of these things are important…, but deleting things now might save a future someone wondering why they were added or prevent them propagating into other packages via copy+paste. It also inches us towards declarative packaging by having much less in d/rules. cheers Stuart -- Stuart Prescott http://www.nanonanonano.net/ stuart@nanonanonano.net Debian Developer http://www.debian.org/ stuart@debian.org GPG fingerprint 90E2 D2C1 AD14 6A1B 7EBB 891D BBC1 7EBB 1396 F2F7
Technical Details
Message-ID:
<NO02d-5pdh-1@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!fu-berlin.de!bofh.it!news.nic.it!robomodReferences:
<NNcoN-4YEM-1@gated-at.bofh.it> <NNiaR-51N7-7@gated-at.bofh.it> <NNHiV-5f4K-1@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!fu-berlin.de!bofh.it!news.nic.it!robomod From: Stuart Prescott <stuart@debian.org> Newsgroups: linux.debian.maint.python Subject: Re: AutoPkgTest to run Doctest on installed Python modules Date: Wed, 14 Oct 2026 07:50:01 +0200 Message-ID: <NO02d-5pdh-1@gated-at.bofh.it> References: <NNcoN-4YEM-1@gated-at.bofh.it> <NNiaR-51N7-7@gated-at.bofh.it> <NNHiV-5f4K-1@gated-at.bofh.it> X-Original-To: Ben Finney <bignose@debian.org>, debian-python@lists.debian.org X-Mailbox-Line: From debian-python-request@lists.debian.org Wed Oct 14 05:43:09 2026 Old-Return-Path: <stuart@debian.org> X-Amavis-Spam-Status: No, score=-4.641 tagged_above=-10000 required=5.3 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.241, 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 User-Agent: Mozilla Thunderbird Content-Language: en-GB Autocrypt: addr=stuart@debian.org; keydata= xsFNBFB3ScwBEACzJ9ehyV3mYYBk+LKkJC4Bnz20a9PGs1hs5pYGWxx8dy59VVUkAnGyHVrX fs0o0E4WdXZDx8mHVKWvRdBN8izuDX/rB11ItPckVJAINLt8r+iHnb3EzcXXQnWdW7VWVvR4 AdL2fSF0sq0RXdG48XyHF+LqIAvohIcywe/379mblhFjYxv9YVJSANotP4J+w5voRSuyB53v JLzJlkuyZLiJu3BE36zFRq+zMJ28t+F+PjtdtK2/f3XQVAlQ1DFJkOgKtm7n9QESponJz3y6 t3/wWjAtSjEGCLtAho78ySZy/Q3VwxWRA9eZwlw9OHXM5itHYF584NIZptixp//9DgEgUdEP vPiFbY1UKSNvahx78PfNPqAQBL5c/SDbiBrz7/pa4ygr4BvKjjgTr4DLQuTO9N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JNvGeW59UEcBRHOy6HFQEg+5GOWUYbHJ2XAvX SCRgiRkucKXq0w8OZgJLAXkktmEoj4adAxrDdUfjd8HG8Ac1de0tzG957fZg0v59Z/O6O+6o o8m3Iweb7vzDaEOTPDqMK++GuRRC2RurKGEHkX9sWNvBadOHALoUP2XJTkRQ2lBgXu0yvEEJ QpeuO3/pTdt86SGVGQ/fCcbmdk9ZgC0GixtTP/lbhBtdj+62ym2VdcOGAQESuNPoFtbNLHTP 4Ohh8Q4vj3oz8pSSr2Dx5wqh5uvLxH6F7Dn4WI9+H7s7blqwZsrWBYrz5NQLAteeDqyeCkX/ rNAdrJokPzdpa8SzpmOz7lqGR0U5FBdjobMd+e2twXWY2+VdWPRCcVH/IrLNenvS9w== Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Debian-User: stuart X-Mailing-List: <debian-python@lists.debian.org> archive/latest/24126 List-ID: <debian-python.lists.debian.org> List-URL: <https://lists.debian.org/debian-python/> List-Archive: https://lists.debian.org/msgid-search/a36d9d53-8c27-41b4-85ae-07e77f39c36d@debian.org Approved: robomod@news.nic.it Lines: 44 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Wed, 14 Oct 2026 16:42:45 +1100 X-Original-Message-ID: <a36d9d53-8c27-41b4-85ae-07e77f39c36d@debian.org> X-Original-References: <875wz7u4rc.fsf@benfinney.id.au> <20261012065551.32714c0e@debian.org> <87wlrmrl8d.fsf_-_@benfinney.id.au>