Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.maint.python > #8195
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Barry Warsaw <barry@python.org> |
| Newsgroups | linux.debian.devel.mentors, linux.debian.maint.python |
| Subject | Re: Test suite needs script built after dh_auto_test is run |
| Date | Fri, 05 Feb 2016 20:20:02 +0100 |
| Message-ID | <qYU5c-4l7-41@gated-at.bofh.it> (permalink) |
| References | <qYFSz-3zj-19@gated-at.bofh.it> |
| X-Original-To | debian-mentors@lists.debian.org |
| X-Mailbox-Line | From debian-mentors-request@lists.debian.org Fri Feb 5 19:18:13 2016 |
| Old-Return-Path | <debian-mentors@m.gmane.org> |
| X-Amavis-Spam-Status | No, score=-12.58 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, FOURLA=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, LDO_WHITELIST=-5, MURPHY_DRUGS_REL8=0.02, PGPSIGNATURE=-5, RCVD_IN_DNSWL_LOW=-0.7, RP_MATCHES_RCVD=-0.001] autolearn=ham autolearn_force=no |
| X-Policyd-Weight | using cached result; rate:hard: -6.1 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| Organization | Damn Crazy Followers of the Horn |
| Lines | 65 |
| MIME-Version | 1.0 |
| Content-Type | multipart/signed; micalg=pgp-sha256; boundary="Sig_/YzevCF5cpeP4e0Ztwa+=sh4"; protocol="application/pgp-signature" |
| X-Gmane-NNTP-Posting-Host | mail.wooz.org |
| X-Newsreader | Claws Mail 3.13.1 (GTK+ 2.24.29; x86_64-pc-linux-gnu) |
| X-Mailing-List | <debian-mentors@lists.debian.org> archive/latest/84513 |
| List-ID | <debian-mentors.lists.debian.org> |
| List-URL | <https://lists.debian.org/debian-mentors/> |
| List-Archive | https://lists.debian.org/msgid-search/20160205141751.04b87acf@anarchist.wooz.org |
| Approved | robomod@news.nic.it |
| Sender | robomod@news.nic.it |
| X-Original-Cc | debian-python@lists.debian.org |
| X-Original-Date | Fri, 5 Feb 2016 14:17:51 -0500 |
| X-Original-Message-ID | <20160205141751.04b87acf@anarchist.wooz.org> |
| X-Original-References | <20160205040842.GA27579@artemis.silentflame.com> |
| X-Original-X-Complaints-To | usenet@ger.gmane.org |
| Xref | csiph.com linux.debian.devel.mentors:35207 linux.debian.maint.python:8195 |
Cross-posted to 2 groups.
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
On Feb 04, 2016, at 09:08 PM, Sean Whitton wrote: >I'm packaging a Python application, ocrmypdf [1], that has a test suite >run by py.test. Most of the tests fail because they try to call the >/usr/bin/ocrmypdf script. This script doesn't exist until after >debhelper has run setup.py, which generates it using its "entry points >script" feature. And this comes after dh_auto_test. > >The only solution I've come up with is producing my own entry point >script and putting it into $PATH for the test suite to use. But that >rather defeats the purpose of testing the actual package's contents. There are a few approaches I've taken in similar situations. If ocrmypdf supports Python's -m option, you could consider patching the test suite to run `python -m ocrmydf` instead. Season to taste for python3 and or both if you're using pybuild. If the package uses tox to run its test suite, then you'll have the executable in .tox/pyXY/bin and you could try to run that instead. As a last resort, I have disabled the build-time tests (all or only the ones that require the /usr/bin) and then arranged for the full test suite to run via autopkgtest/DEP-8. It's not ideal because Debian currently doesn't gate on DEP-8 passing, but Ubuntu does and at least I'll see failures there. FWIW, I think it's almost always a good idea to add a simple DEP-8 smoke test for Python packages, just to prove that the modules can be imported if nothing else. Cheers, -Barry
Back to linux.debian.maint.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Test suite needs script built after dh_auto_test is run Sean Whitton <spwhitton@spwhitton.name> - 2016-02-05 05:10 +0100
Re: Test suite needs script built after dh_auto_test is run Barry Warsaw <barry@python.org> - 2016-02-05 20:20 +0100
Re: Test suite needs script built after dh_auto_test is run Sean Whitton <spwhitton@spwhitton.name> - 2016-02-07 00:20 +0100
csiph-web