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


Groups > linux.debian.maint.python > #12105 > unrolled thread

pytest help needed

Started byAndreas Tille <andreas@an3as.eu>
First post2019-12-04 19:30 +0100
Last post2019-12-04 19:40 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.debian.maint.python


Contents

  pytest help needed Andreas Tille <andreas@an3as.eu> - 2019-12-04 19:30 +0100
    Re: pytest help needed Andrey Rahmatullin <wrar@debian.org> - 2019-12-04 19:30 +0100
    Re: pytest help needed Scott Talbert <swt@techie.net> - 2019-12-04 19:40 +0100

#12105 — pytest help needed

FromAndreas Tille <andreas@an3as.eu>
Date2019-12-04 19:30 +0100
Subjectpytest help needed
Message-ID<z9Hzr-6Ih-9@gated-at.bofh.it>
Hi,

I try to prepare the latest git commit from upstream of python-pbcore[1].
Unfortunately the build time test fails with:

...
  dh_auto_test
I: pybuild base:217: python3.8 setup.py test
running pytest
running egg_info
writing pbcore.egg-info/PKG-INFO
writing dependency_links to pbcore.egg-info/dependency_links.txt
writing entry points to pbcore.egg-info/entry_points.txt
writing requirements to pbcore.egg-info/requires.txt
writing top-level names to pbcore.egg-info/top_level.txt
reading manifest file 'pbcore.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
/usr/lib/python3.8/distutils/dist.py:274: UserWarning: Unknown distribution option: 'test_requires'
  warnings.warn(msg)
warning: no files found matching '*.txt'
writing manifest file 'pbcore.egg-info/SOURCES.txt'
running build_ext
ERROR: usage: setup.py [options] [file_or_dir] [file_or_dir] [...]
setup.py: error: unrecognized arguments: -n --dist=loadscope --cov=./pbcore --cov-report=xml:coverage.xml
  inifile: /build/python-pbcore-1.7.1+git20191121.7947eb7+dfsg/pytest.ini
  rootdir: /build/python-pbcore-1.7.1+git20191121.7947eb7+dfsg

E: pybuild pybuild:341: test: plugin custom failed with: exit code=4: python3.8 setup.py test
dh_auto_test: pybuild --test --test-pytest -i python{version} -p "3.8 3.7" returned exit code 13
...

Those arguments are mentioned in pytest.ini which reads:


[pytest]
markers =
    pbtestdata: requires the 'PacBioTestData' package to be installed
    internal_data: requires access to internal data on '/pbi/dept/secondary/siv/testdata'
    constools: requires 'pbindex', 'samtools' and 'pbmerge' in PATH

addopts =
    -v -n auto --dist=loadscope --durations=20 --junitxml=nosetests.xml --cov=./pbcore --cov-report=xml:coverage.xml


Any hints what options I should use instead?

Kind regards

       Andreas.

[1] https://salsa.debian.org/med-team/python-pbcore

-- 
http://fam-tille.de

[toc] | [next] | [standalone]


#12106

FromAndrey Rahmatullin <wrar@debian.org>
Date2019-12-04 19:30 +0100
Message-ID<z9Hzr-6Ih-7@gated-at.bofh.it>
In reply to#12105

[Multipart message — attachments visible in raw view] — view raw

Why are you running tests via PYBUILD_SYSTEM=custom
PYBUILD_TEST_ARGS="{interpreter} setup.py test"? Is the pytest one not
working?

-- 
WBR, wRAR

[toc] | [prev] | [next] | [standalone]


#12107

FromScott Talbert <swt@techie.net>
Date2019-12-04 19:40 +0100
Message-ID<z9HJ8-6Lz-9@gated-at.bofh.it>
In reply to#12105
On Wed, 4 Dec 2019, Andreas Tille wrote:

> Hi,
>
> I try to prepare the latest git commit from upstream of python-pbcore[1].
> Unfortunately the build time test fails with:
>
> ...
>  dh_auto_test
> I: pybuild base:217: python3.8 setup.py test
> running pytest
> running egg_info
> writing pbcore.egg-info/PKG-INFO
> writing dependency_links to pbcore.egg-info/dependency_links.txt
> writing entry points to pbcore.egg-info/entry_points.txt
> writing requirements to pbcore.egg-info/requires.txt
> writing top-level names to pbcore.egg-info/top_level.txt
> reading manifest file 'pbcore.egg-info/SOURCES.txt'
> reading manifest template 'MANIFEST.in'
> /usr/lib/python3.8/distutils/dist.py:274: UserWarning: Unknown distribution option: 'test_requires'
>  warnings.warn(msg)
> warning: no files found matching '*.txt'
> writing manifest file 'pbcore.egg-info/SOURCES.txt'
> running build_ext
> ERROR: usage: setup.py [options] [file_or_dir] [file_or_dir] [...]
> setup.py: error: unrecognized arguments: -n --dist=loadscope --cov=./pbcore --cov-report=xml:coverage.xml
>  inifile: /build/python-pbcore-1.7.1+git20191121.7947eb7+dfsg/pytest.ini
>  rootdir: /build/python-pbcore-1.7.1+git20191121.7947eb7+dfsg
>
> E: pybuild pybuild:341: test: plugin custom failed with: exit code=4: python3.8 setup.py test
> dh_auto_test: pybuild --test --test-pytest -i python{version} -p "3.8 3.7" returned exit code 13
> ...
>
> Those arguments are mentioned in pytest.ini which reads:
>
>
> [pytest]
> markers =
>    pbtestdata: requires the 'PacBioTestData' package to be installed
>    internal_data: requires access to internal data on '/pbi/dept/secondary/siv/testdata'
>    constools: requires 'pbindex', 'samtools' and 'pbmerge' in PATH
>
> addopts =
>    -v -n auto --dist=loadscope --durations=20 --junitxml=nosetests.xml --cov=./pbcore --cov-report=xml:coverage.xml
>
>
> Any hints what options I should use instead?

I think you also need pytest plugins xdist and cov (Debian packages 
python3-pytest-xdist and python3-pytest-cov).

Scott

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.maint.python


csiph-web