Re: pybuild: where to put --test-pytest?
[Nikolaus Rath, 2014-03-14]
> It seems that pybuild tries to find the tests in some temporary
> directory:
>
> $ debuild -us -uc
> [....]
> make[1]: Leaving directory `ROOT/python-dugong-2.1'
> dh_auto_test -O--buildsystem=pybuild
> I: pybuild base:170: cd ROOT/python-dugong-2.1/.pybuild/pythonX.Y_3.4/build; python3.4 -m pytest
> ============================= test session starts ==============================
> platform linux -- Python 3.4.0 -- pytest-2.5.1
> collected 0 items
> [...]
>
> This is presumably because the tests are in ROOT/test, not in
> ROOT/python-dugong-2.1/.pybuild/pythonX.Y_3.4/build. The latter seems to
> contain only the dugong module itself.
>
> Who/what is responsible for copying the tests in this directory?
how about instead of copying these files, pointing pytest to them?
export PYBUILD_TEST_ARGS={dir}/test/
if you really need to copy them (or invoke 2to3, etc.), you can use
PYBUILD_BEFORE_TEST (or --before-test) to invoke any command before each
test, see `man pybuild` for more info.
--
Piotr Ożarowski Debian GNU/Linux Developer
www.ozarowski.pl www.griffith.cc www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645
Reply to: