combine python coverage files?

tunarob picture tunarob · Oct 6, 2014 · Viewed 15k times · Source

I'm wondering if it's possible to combine coverage.xml files into 1 file to see global report in HTML output.

I've got my unit/functional tests running as 1 command and integration tests as the second command. That means my coverage for unit/functional tests are overridden by unit tests.

That would be great if I had some solution for that problem, mainly by combining those files into 1 file.

Answer

tunarob picture tunarob · Oct 7, 2014

I found a different solution. I used combine feature (read here) So I run my coverage like: coverage run -p and then I do coverage combine.

That's all. It generates 1 combined report.