pytest-cov
pytest-cov copied to clipboard
add lcov as output format
I'm currently try to setup automatic code coverage into vscode. the only available plugin require that coverage output is set as lcov format.
This format support had been integrated recently into coverage lib : https://coverage.readthedocs.io/en/6.3.2/cmd.html#lcov-reporting-coverage-lcov and I need it into pytest-cov for a good integration
This feature seen to be quite simple to implement :
- from
def validate_report(arg):
we should add the new format intofile_choices
- from
def summary(self, stream):
on engine, we should add a block for lcov format like the one for xml on line 193-197
I'm not sure if it's fullfill all the needed work, but it's a good start
You don't need to add anything to pytest-cov. Just run coverage lcov
after you run pytest.
Technically it's work, but with the integration with vscode it's require one manual step.
My main interrogation is why it could be an issue to add another output format. Let the code as this break expectation that all format supported inside coverage library is supported inside pytest-cov