[TIP] Installation issue with coverage and setuptools

Christoph Buchner bilderbuchi at phononoia.at
Wed Jan 15 05:32:35 PST 2014


Thank you! It was not clear to me that setup.py test does not do all installation steps, I thought this was just a local (but full) installation of tests requirements.

I have solved my issue by going the pip route, and using the 'pip install .[test]' approach.

all the best,
Christoph

Marius Gedminas wrote on 15.01.2014 07:43:

> 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
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python
> 




More information about the testing-in-python mailing list