Comments (5)
I don't use lcov much, how do I get the genhtml tool? This issue might be particular to lcov/genhtml. When I use coverage html
, I get an html report that excludes the import lines.
BTW, this isn't related to your problem, but you don't want to use import
as an exclude_lines
setting, because it will exclude any line with that word in it, including things like important_value = critical_work()
. You want a more specific regex, like ^import\b
.
from coveragepy.
genhtml
is downloaded from brew install lcov
. https://github.com/linux-test-project/lcov/blob/master/bin/genhtml and it's a tool to help visualize lcov files. Here's the lcov content:
TN:
SF:test_jkl.py
DA:1,1,mUDsnWRiqW9R9nTILGKIZg
DA:2,1,3QNj+DkOnaTvpnIwAiI3Uw
DA:4,1,NxIa0sVNftaSOeuKKM9NCQ
DA:5,1,lTOFy5prvzMQc1MdN7tkoQ
DA:6,1,X6gPYOlvig8TUShq060KfQ
DA:7,1,hn+m5M7Ya5u0W/sLhVQRkw
DA:8,1,4hQYWCByYJ7KOpJ/K/mtdQ
DA:10,1,0PMxynBwwrK++xNpS9EpEA
DA:12,1,tVVJRENRBGwuAT3Tc8Hl5w
LF:8
LH:9
BRDA:10,0,0,-
BRDA:8,0,1,1
BRF:2
BRH:1
end_of_record
You're right that it's only reproable on lcov which is the coverage format that we use. I would be happy to create a PR to address this. Would you be willing to accept patches to coverage==6.4.1?
from coveragepy.
Created a PR: #1685
from coveragepy.
This is fixed in 37e1214 and finished in 3e011a5
from coveragepy.
This is now released as part of coverage 7.3.2.
from coveragepy.
Related Issues (20)
- Nested matches of exclude_lines patterns leads to unmatched lines being excluded HOT 3
- Add a hint that `coverage combine` might be needed
- Allow disabling parallel mode from the command line HOT 3
- BUG: inconsistent meaning of `skip_covered` between `coverage report` and `coverage html`
- MemoryError in `coverage report` on Python 3.12 HOT 5
- Zero coverage of process spawned by dogtail HOT 4
- oss-fuzz 69058: TokenError HOT 4
- Support coverage plugins with sys.monitoring
- Memory leak when generating reports HOT 18
- Line incorrectly reported as uncovered in python 3.11 involving `asyncio.to_thread` and a conditional
- A way to get report data in detail HOT 15
- `continue` incorrectly marked as uncovered on python 3.9 HOT 2
- pragma: no cover ignored and coverage wrongly calculated HOT 4
- How to exclude a line without the block it introduces? HOT 1
- coverage.tracer thread-safety warning with Python 3.13 free-threaded HOT 3
- Provide the ability to exclude a code block from coverage HOT 5
- PermissionError: [Errno 13] Permission denied: '/dev/stdout' HOT 2
- how to write a parser for raw coverage file (.coverage) and a json reporter in golang ? HOT 2
- COVERAGE_CORE=sysmon with branch coverage can be 2x slower than default in some cases HOT 1
- Overall Branch and Function coverage percentage in json report HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coveragepy.