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

empty files shown as below coverage threshold #112

Open
nim-jazzx opened this issue Mar 28, 2024 · 0 comments
Open

empty files shown as below coverage threshold #112

nim-jazzx opened this issue Mar 28, 2024 · 0 comments

Comments

@nim-jazzx
Copy link

I have a Python repo in which the code coverage extension is showing an error next to the empty __init__.py files claiming that these files have 0% code coverage which is less than the threshold.

I would expect that coverage should show 100% for files with 0 statements. Or at the very least no error should be shown.

Here's the command used to run coverage:

coverage erase && coverage run --concurrency gevent -m pytest && coverage report && coverage html && coverage lcov

And here's the output snippet:

Name                                 Stmts   Miss  Cover
--------------------------------------------------------
...
xxxx/__init__.py                         0      0   100%
...

The above __init__.py file shows up with a red <% symbol next to it in the explorer.

Here is how the extension is configured in my .devcontainer.json file:

                "markiscodecoverage.coverageThreshold": 100,
                "markiscodecoverage.enableDecorations": true,
                "markiscodecoverage.enableOnStartup": true,
                "markiscodecoverage.searchCriteria": "coverage.lcov",
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

No branches or pull requests

1 participant