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 best solutions below

1
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