django-nose icon indicating copy to clipboard operation
django-nose copied to clipboard

Cover only the app(s) being tested

Open AdrianLC opened this issue 12 years ago • 4 comments

Hello,

Is there any way to do this automatically, without having to limit the covered code explicitly?

I know I can do:

manage.py test app1 app2 --with-coverage --cover-package=app1 --cover-package=app2

but having to type the packages names twice is a pain in the ass.

Is this already supported or do you know of any plugin for this?

Thanks!

AdrianLC avatar Sep 17 '13 18:09 AdrianLC

I used to do this with a fabric script, worked pretty well and was easy to write. There might be something built into django-nose, but I don't know any.

fabiosantoscode avatar Sep 22 '13 03:09 fabiosantoscode

@fabiosantoscode Yeah, at the moment I'm using django-coverage. It simply works like that by default. But I would like to switch to nose for the versatility that the plugins provide.

AdrianLC avatar Sep 23 '13 00:09 AdrianLC

It would be trivial to contribute a small patch with an extra option (a toggle that is equivalent to adding a --cover-package directive for every app). I would do it if I had the time. Can you? On 23 Sep 2013 01:24, "Adrián López Calvo" [email protected] wrote:

@fabiosantoscode https://github.com/fabiosantoscode Yeah, at the moment I'm using django-coverage. It simply works like that by default. But I would like to switch to nose for the versatility that the plugins provide.

— Reply to this email directly or view it on GitHubhttps://github.com/jbalogh/django-nose/issues/141#issuecomment-24894103 .

fabiosantoscode avatar Sep 27 '13 11:09 fabiosantoscode

I use .coveragerc to specify the apps I'm interested in. See .coveragrc from the django-nose repo for an example.

jwhitlock avatar Jul 02 '15 22:07 jwhitlock