question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support python coverage

See original GitHub issue

The python tool coverage is much more common and mainstream than pytest-cov (which requires non-standard pytest runner) see both pytest-cov stats and coverage stats

This means this plugin is not useful for projects not willing to use the non-standard pytest.

Please consider adding support for coverage.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:9
  • Comments:18 (6 by maintainers)

github_iconTop GitHub Comments

6reactions
drettiecommented, Sep 11, 2019

The python coverage module already has a command to convert the .coverage file to html and cobertura compliant xml which then can be parse with this extension.

Here are the commands i run -

coverage run --branch -m unittest discover
coverage xml -o cov.xml
coverage html

I was quite confused getting this to work at first as the extension by default only searches for files named cov.xml whereas the default output filename from the coverage xml command is coverage.xml.

If for some reason you can’t rename the xml file there is also an option to change the default xml file in the extension settings.

@ryanluker might be worth adding coverage.xml as a default somewhere ?

1reaction
ryanlukercommented, Aug 1, 2021

@Josverl @ssbarnea Thanks for the spirited discussion, hopefully calmer heads have prevailed in the end. Just to give some input from myself, the plan is still to eventually provide support to coverage in milestone 3.0.0, but that is still a bit away and development on the extension is purely on a volunteer basis making it hard to give an expected timeline for this ticket.

We will continue to support what is laid out in the example python project (using the older setup) that is covered via integrations test to make sure that flow still can be used by python devs. Once the new coverage parser is developed, we will add this as a new option for python devs, while still supporting the older flow in the meantime as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Coverage.py — Coverage.py 7.0.1 documentation
Coverage.py is a tool for measuring code coverage of Python programs. It monitors your program, noting which parts of the code have been...
Read more >
coverage - PyPI
Code coverage testing for Python. ... Coverage.py measures code coverage, typically during test execution. It uses the code analysis tools and tracing hooks ......
Read more >
Python Code Coverage Tools For 2020 - SeaLights
Coverage.py is one of the most popular code coverage tools for Python. It uses code analysis tools and tracing hooks provided in Python...
Read more >
nedbat/coveragepy: The code coverage tool for Python - GitHub
Coverage.py measures code coverage, typically during test execution. It uses the code analysis tools and tracing hooks provided in the Python standard library ......
Read more >
Python unittest coverage
The test coverage is also known as code coverage. The test coverage is often used to assess the quality of a test suite....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found