Path: csiph.com!au2pb.net!feeder.erje.net!2.us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod From: Barry Warsaw Newsgroups: linux.debian.maint.python Subject: Re: Help with pytest 2.8.5 Date: Thu, 17 Dec 2015 16:10:01 +0100 Message-ID: References: X-Original-To: debian-python@lists.debian.org X-Mailbox-Line: From debian-python-request@lists.debian.org Thu Dec 17 15:07:19 2015 Old-Return-Path: X-Amavis-Spam-Status: No, score=-5.9 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DIGITS_LETTERS=1, FOURLA=0.1, LDO_WHITELIST=-5] autolearn=no autolearn_force=no X-Policyd-Weight: using cached result; rate: -5 Organization: The Organization of Unorganized Woozalists X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.28; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailing-List: archive/latest/13309 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/20151217100648.7b2a5168@limelight.wooz.org Approved: robomod@news.nic.it Lines: 58 Sender: robomod@news.nic.it X-Original-Date: Thu, 17 Dec 2015 10:06:48 -0500 X-Original-Message-ID: <20151217100648.7b2a5168@limelight.wooz.org> X-Original-References: <20151216191736.02c2dd33@limelight.wooz.org> <20151217121554.GY16403@sar0.p1otr.com> Xref: csiph.com linux.debian.maint.python:7991 Thanks for the suggestions Tristan & Piotr, On Dec 17, 2015, at 01:15 PM, Piotr O=C5=BCarowski wrote: >> diff --git a/debian/rules b/debian/rules >> index f473395..3c2f918 100755 >> --- a/debian/rules >> +++ b/debian/rules >> @@ -59,8 +59,9 @@ override_dh_clean: >> override_dh_auto_test: >> ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) >> set -ex; \ >> + cd /tmp; \ >> for py in $(PYVERS) $(PY3VERS); do \ >> - PYTHONPATH=3D$(CURDIR) python$$py -m pytest testing ; \ >> + PYTHONPATH=3D$(CURDIR) python$$py -m pytest $(CURDIR)/te= sting ; \ > >PYTHONPATH=3D$(CURDIR) part looks very suspicious (and error prone) > >> done >> endif > >I didn't test it but... why is override_dh_auto_test needed at all? >Did you try with: > > export PYBUILD_TEST_ARGS=3D{dir}/testing > >? >(only "test" or "tests" are copied to build dir by default, you need to >pass path to directory with tests if they're in non standard location) I did try various riffs on this theme, but am still unable to get tests_genscript.py to pass. FWIW, here's the current pybuild-based rule: # 2015-12-16 barry@debian.org: Because pytest does not clean up after itsel= f, # use a custom temporary directory (which is easier to clean up manually, # e.g. in an sbuild). override_dh_auto_test: TMPDIR=3D`mktemp -t -d pytest.XXXXXXXXXX` \ PYBUILD_SYSTEM=3Dcustom \ PYTHONPATH=3D$$(CURDIR) \ PYBUILD_TEST_ARGS=3D"{interpreter} -m pytest --lsof -rfsxX {dir}/testing" = dh_auto_test Don't worry about the style of the above unless it's material to the failur= e. As I mentioned, I've tried lots of different variations. None allow test_genscript.py to pass. (Setting or not PYTHONPATH also makes no difference.) I believe genscript is deprecated in pytest, so I'm seriously considering j= ust disabling this test for now and moving on. Cheers, -Barry