# HG changeset patch # User Marcelo de Sena Lacerda # Date 1241787336 -7200 # Node ID c7c331ed9a4976181381644df941398faee9e5a8 # Parent 2cc532110b6f64dfdd7ee0c69bcc49370f883e8e Add coverage support to the test suite This requires nose 0.11 to run. diff -r 2cc532110b6f -r c7c331ed9a49 tests/run.py --- a/tests/run.py Fri May 08 14:42:16 2009 +0200 +++ b/tests/run.py Fri May 08 14:55:36 2009 +0200 @@ -62,7 +62,10 @@ apiproxy_stub_map.apiproxy.RegisterStub('mail', mail_stub.MailServiceStub()) import django.test.utils django.test.utils.setup_test_environment() - nose.main(plugins=[AppEngineDatastoreClearPlugin(), ]) + + from nose.plugins import cover + plugin = cover.Coverage() + nose.main(plugins=[AppEngineDatastoreClearPlugin(), plugin]) if __name__ == '__main__': diff -r 2cc532110b6f -r c7c331ed9a49 tests/setup.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/setup.cfg Fri May 08 14:55:36 2009 +0200 @@ -0,0 +1,8 @@ +[nosetests] +exclude=pymox +with-coverage=1 +cover-package=soc +cover-erase=1 +cover-html=1 +cover-html-dir=coverageResults +#debug=nose.plugins.cover