Anyway to specify the type of report on .coveragerc?

1.3k views Asked by At

I'm trying to move as much as I can the configuration of pytest-cov on .coveragerc

I need to replicate the --cov-report xml argument passed on the command line inside the file.

I tried to use [xml] tag and output = whatever, then i found outfile and i used that one as well, but still the report is not streamed to a xml file.

Anyone did have the same issue?

1

There are 1 answers

1
Ned Batchelder On BEST ANSWER

You can't specify the type of report in the .coveragerc file. If you want to stop using pytest-cov, then you need two commands: one to run the tests under coverage, and one to generate the report:

$ coverage run -m py.test etc etc
$ coverage xml