Re: How to run upstream test suite that uses ‘tox’?
On Nov 16, 2013, at 08:06 PM, Ben Finney wrote:
>I'm trying to run the test suite of a packagfe I'm maintaining. Upstream
>only supports running the test suite using ‘tox’:
>
> $ tox -e py27,py33
>
>But this fails in a Debian build environment because ‘tox’ expects to
>install packages from PyPI, and ignores already-installed OS packages.
FWIW, this is the big blocker for me uploading tox 1.6.1.
Generally, you can run a tox-based test suite as part of your package build,
but you'll probably have to add a patch which liberally sprinkles
`site-packages=True` in the tox.ini.
A while ago I started some discussion with upstream about how tox could better
support a Debian build environment exactly as you describe, where all the
dependencies are fulfilled by site packages and PyPI is never hit. We had
some good discussions and I think upstream understand our problem, but I also
think it's rather tricky for them to support, so it hasn't happened yet.
E.g. I suggested a switch or envar which essentially forced site-packages=True
regardless of what the tox.ini file said.
>Alternatively, I don't really care about the special features of ‘tox’;
>I only want to run the test suite with the specific PYthon version. What
>can I do in the build environment to run the test suite as ‘tox’ would
>run it?
What command is the tox.ini invoking? Often you can just run that in your
d/rules. Piotr also suggests in a later message pybuild's --test-tox switch.
I haven't had a chance to try this yet, so if you do, please let us know how
that goes.
-Barry
Reply to: