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.

Using for Python code and coverage.py

See original GitHub issue

I was just looking into this for use in the GitHub actions beta, and covering my Python code, but it looks like the coverage tooling for Python doesn’t support lcov output (ie running coverage.py via pytest-cov on pytest unittests).

I know that the coveralls Python library can interface with the coveralls.io API, so I’m curious what the suggested solution might be.

Any ideas?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:9
  • Comments:17 (1 by maintainers)

github_iconTop GitHub Comments

22reactions
aodjcommented, Sep 9, 2019

Just to keep this ticket up-to-date I gave up with this action, and just used the coveralls Python package. Workflow for reference.

16reactions
nickmerwincommented, Aug 20, 2019

Hi @aodj, could you try the steps described here:

https://github.com/coveralls-clients/coveralls-python/blob/master/docs/usage/multilang.rst

e.g.:

coveralls --output=coverage.json
coveralls-lcov -v -n coverage.info > coverage.json

Then use “./coverage.json” as the path-to-lcov input for the Coveralls Action.

Let me know how it goes, thanks!

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 >
How to properly use coverage.py in Python? - Stack Overflow
As you see, all my code is covered with tests and py.test says all of them pass. I expect Coverage.py to show 100%...
Read more >
An Intro to coverage.py - Mouse Vs Python
Coverage.py is a 3rd party tool for Python that is used for measuring your code coverage. It was originally created by Ned Batchelder....
Read more >
Increase Test Coverage - Python Developer's Guide
For the truly daring, you can use another powerful feature of coverage.py: branch coverage. Testing every possible branch path through code, while a...
Read more >
A Quick Intro to To Test Coverage in Python - In Plain English
Coverage is a tool that comes in handy in testing as it generates a report and gives you a percentage of your code...
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