[py-dev] pytest-cov

holger krekel holger at merlinux.eu
Tue Aug 3 10:14:28 CEST 2010


On Mon, Aug 02, 2010 at 16:05 +0200, holger krekel wrote:
> Hum, how does the "out-of-the-box" work exactly?  
> It won't always be enabled just because pytest-cov is installed, will it? 
> (if so, i'd rather suggest to do an indirection and only perform coverage
> if a certain environment varialbe like PYTEST_COV_AUTOSUB=1 or so it st).

FYI i think pytest-cov begins to work better than pytest-figleaf 
in some cases! :)  

However, i consider it crucial that installing pytest-cov has no side effects
by default.  With the above suggestion we could make py.test set the environment
variable when a coverage-run is selected and otherwise avoid any side effects,
particularly when py.test is not even run.  IOW, i'd be very happy with a 
pytest-cov-1.1 streamlining this issue so it's safe to point people to it :)

best,
holger

> 
> > I will be putting it through it's paces in more depth.
> > 
> > A doc update on the site would probably be good.
> > 
> > Give it a try if anyone interested and let me know how it goes.
> 
> I tried it, worked fine (and i really like the slim interface!). 
> Notes:
> 
> * --cov=path ... the help string should say what path, file-system or
>   python import-path? 
> 
> * when i ran "py.test --cov=py._code" it worked fine, i.e. only showed 
>   results for the py._code subpackage.  When i mistype the path, 
>   e.g. "py.test --cov=py._code2" it will give me *all* results which 
>   is wrong: i'd expect "no coverage data for import path "py._code2" found
>   or something like this. 
> 
> cheers,
> holger
> _______________________________________________
> py-dev mailing list
> py-dev at codespeak.net
> http://codespeak.net/mailman/listinfo/py-dev
> 

-- 



More information about the Pytest-dev mailing list