django-nose
django-nose copied to clipboard
Cover only the app(s) being tested
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!
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 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.
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 .
I use .coveragerc to specify the apps I'm interested in. See .coveragrc from the django-nose repo for an example.