Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #7991

Re: Help with pytest 2.8.5

From Barry Warsaw <barry@debian.org>
Newsgroups linux.debian.maint.python
Subject Re: Help with pytest 2.8.5
Date 2015-12-17 16:10 +0100
Message-ID <qGIlP-154-3@gated-at.bofh.it> (permalink)
References <qGusx-oe-3@gated-at.bofh.it> <qGEUW-79i-9@gated-at.bofh.it> <qGFHk-7JC-1@gated-at.bofh.it>
Organization The Organization of Unorganized Woozalists

Show all headers | View raw


Thanks for the suggestions Tristan & Piotr,

On Dec 17, 2015, at 01:15 PM, Piotr Ożarowski 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=$(CURDIR) python$$py -m pytest testing ; \
>> +               PYTHONPATH=$(CURDIR) python$$py -m pytest $(CURDIR)/testing ; \
>
>PYTHONPATH=$(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={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 itself,
# use a custom temporary directory (which is easier to clean up manually,
# e.g. in an sbuild).
override_dh_auto_test:
	TMPDIR=`mktemp -t -d pytest.XXXXXXXXXX` \
	PYBUILD_SYSTEM=custom \
	PYTHONPATH=$$(CURDIR) \
	PYBUILD_TEST_ARGS="{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 failure.
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 just
disabling this test for now and moving on.

Cheers,
-Barry

Back to linux.debian.maint.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Help with pytest 2.8.5 Barry Warsaw <barry@debian.org> - 2015-12-17 01:20 +0100
  Re: Help with pytest 2.8.5 Piotr Ożarowski <piotr@debian.org> - 2015-12-17 13:20 +0100
    Re: Help with pytest 2.8.5 Tristan Seligmann <mithrandi@mithrandi.net> - 2015-12-17 13:50 +0100
    Re: Help with pytest 2.8.5 Barry Warsaw <barry@debian.org> - 2015-12-17 16:10 +0100

csiph-web