Hi, For one of my packages (sunpy), I want to complete the switch to pybuild by removing the custom (and quite unperfect) dh_override_auto_test rule.
Currently, I have the following lines in d/rules: override_dh_auto_test: python -m pytest sunpy -k "not figure and not online" python3 -m pytest sunpy -k "not figure and not online" This gives successfull tests with the following output in the log: --------------------------8<------------------------------------------- debian/rules override_dh_auto_test make[1]: Entering directory '/<<PKGBUILDDIR>>' pyversions: missing X(S)-Python-Version in control file, fall back to debian/pyversions pyversions: missing debian/pyversions file, fall back to supported versions pyversions: missing X(S)-Python-Version in control file, fall back to debian/pyversions pyversions: missing debian/pyversions file, fall back to supported versions python -m pytest sunpy -k "not figure and not online" ============================= test session starts ============================== platform linux2 -- Python 2.7.15, pytest-3.6.4, py-1.5.4, pluggy-0.6.0 rootdir: /<<PKGBUILDDIR>>, inifile: setup.cfg plugins: mock-1.7.1, hypothesis-3.44.1 collected 1448 items / 34 deselected [...] --------------------------8<------------------------------------------- >From the pybuild wiki page, I learned to do instead the override: export PYBUILD_TEST_ARGS=-k "not figure and not online" However, then the tests are not found anymore and the test step fails: --------------------------8<------------------------------------------- dh_auto_test -O--buildsystem=pybuild I: pybuild base:217: cd /build/sunpy-0.9.3/.pybuild/cpython2_2.7_sunpy/build; python2.7 -m pytest -k "not figure and not online" ============================= test session starts ============================== platform linux2 -- Python 2.7.15+, pytest-3.6.4, py-1.6.0, pluggy-0.6.0 rootdir: /build/sunpy-0.9.3, inifile: setup.cfg plugins: mock-1.7.1, hypothesis-3.44.1 collected 0 items ========================= no tests ran in 0.00 seconds ========================= E: pybuild pybuild:338: test: plugin distutils failed with: exit code=5: cd /build/sunpy-0.9.3/.pybuild/cpython2_2.7_sunpy/build; python2.7 -m pytest -k "not figure and not online" dh_auto_test: pybuild --test --test-pytest -i python{version} -p 2.7 returned exit code 13 --------------------------8<------------------------------------------- I don't understand why the tests fail now? How do I correctly specify them? Best regards Ole