Provide coverage metrics for python code.
Pythons ecosystem offers a couple of tools for measuring code coverage, the major ones being coverage by Ned Batchelder and figleaf by C. Titus Brown. Both are independent of the way the code is run; there is no canonical way to 'run the code under coverage'. Therefore, a data-driven approach seems to be the right one: define some data format as the interface and provide a way to feed it into Sonar via the Python plugin. Cobertura XML seems to a good choice for such a format because its quite popular and is already supported by Ned's coverage package.
To create a cobertura report for a set of unit test do something like:
$ nosetests --with-coverage
$ coverage xml