[TIP] Installation issue with coverage and setuptools

Marius Gedminas marius at gedmin.as
Tue Jan 14 22:43:28 PST 2014


On Tue, Jan 14, 2014 at 10:31:22PM +0100, Christoph Buchner wrote:
> When I was preparing a python script of mine to go up on
> Travis(-ci.org), I noticed a weird issue where coverage.py binaries
> were missing on the Travis instance.
>
> I am using setup.py's tests_require argument to install coverage for
> when I run my tests.  I tracked my problem down to the fact that when
> I use `setup.py test` to run the test, when this installs coverage,
> apparently the coverage* scripts apparently don't get installed.

setup.py test doesn't do a proper installation.  It downloads any
missing packages from PyPI into the current directory as .egg files,
then adds them to sys.path for that particular test run, that's all.

> What is going wrong here, and what can I do to fix it? How can I
> install coverage "properly" using setuptools? Are my expectations
> wrong somehow? The install process seems to go significantly
> differently between the two options, too?!

Yes.

Just use pip install.  Or tox.

Some people use setuptools extras to specify their test requirements,
so that they could do something like 'pip install .[test]'.

Marius Gedminas
-- 
A witty saying proves nothing.
                -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20140115/620a4689/attachment.pgp>


More information about the testing-in-python mailing list