Add coverage support to the test suite
authorMarcelo de Sena Lacerda <marceloslacerda@gmail.com>
Fri, 08 May 2009 14:55:36 +0200
changeset 2298 c7c331ed9a49
parent 2297 2cc532110b6f
child 2299 b0e67a2eafff
Add coverage support to the test suite This requires nose 0.11 to run.
tests/run.py
tests/setup.cfg
--- 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__':
--- /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