Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add lcov as output format #535

Closed
alexises opened this issue May 23, 2022 · 2 comments · Fixed by #536
Closed

add lcov as output format #535

alexises opened this issue May 23, 2022 · 2 comments · Fixed by #536

Comments

@alexises
Copy link

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 into file_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

@nedbat
Copy link
Collaborator

nedbat commented May 23, 2022

You don't need to add anything to pytest-cov. Just run coverage lcov after you run pytest.

@alexises
Copy link
Author

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

fetzerch added a commit to fetzerch/pytest-cov that referenced this issue May 27, 2022
Coverage.py 6.3 gained support for the LCOV output format. Add support
for this to pytest-cov via '--cov-report=lcov[:dest]'.

Fix: pytest-dev#535
fetzerch added a commit to fetzerch/pytest-cov that referenced this issue May 27, 2022
Coverage.py 6.3 gained support for the LCOV output format. Add support
for this to pytest-cov via '--cov-report=lcov[:dest]'.

Fix: pytest-dev#535
fetzerch added a commit to fetzerch/pytest-cov that referenced this issue May 27, 2022
Coverage.py 6.3 gained support for the LCOV output format. Add support
for this to pytest-cov via '--cov-report=lcov[:dest]'.

Fix: pytest-dev#535
fetzerch added a commit to fetzerch/pytest-cov that referenced this issue May 27, 2022
Coverage.py 6.3 gained support for the LCOV output format. Add support
for this to pytest-cov via '--cov-report=lcov[:dest]'.

Fix: pytest-dev#535
fetzerch added a commit to fetzerch/pytest-cov that referenced this issue Aug 1, 2022
Coverage.py 6.3 gained support for the LCOV output format. Add support
for this to pytest-cov via '--cov-report=lcov[:dest]'.

Fix: pytest-dev#535
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants