Skip to content

empty files shown as below coverage threshold #112

Description

@nim-jazzx

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",

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions