Skip to content

adding ... (the ellipsis) to exclude_lines ignores all source #1042

Open
@cjw296

Description

@cjw296

Describe the bug

Adding this to .coveragerc results in all source being ignored:

[report]
exclude_lines =
  ...

To Reproduce
How can we reproduce the problem? Please be specific. Don't just link to a failing CI job. Answer the questions below:

  1. What version of Python are you using? Reproduced 3.6 through 3.9
  2. What version of coverage.py are you using? Reproduced with 4.x through 5.3
  3. What code are you running? simplistix/mush@8488a47
  4. What commands did you run? rm -f .coverage && coverage run -m pytest && coverage report

Expected behavior

Only lines of the following form to be excluded from coverage checking:

def some_example_function_that_will_never_be_called():
   ...

Additional context

The results of the output from this bug are super confusing:

Name                               Stmts   Miss  Cover
------------------------------------------------------
mush/__init__.py                       0      0   100%
mush/asyncio.py                        0      0   100%
mush/callpoints.py                     0      0   100%
mush/compat.py                         0      0   100%
mush/context.py                        0      0   100%
mush/declarations.py                   0      0   100%
mush/extraction.py                     0      0   100%
mush/markers.py                        0      0   100%
mush/modifier.py                       0      0   100%
mush/plug.py                           0      0   100%
mush/requirements.py                   0      0   100%
mush/resources.py                      0      0   100%
mush/runner.py                         0      0   100%
mush/tests/__init__.py                 0      0   100%
mush/tests/helpers.py                  0      0   100%
mush/tests/test_async_context.py       0      0   100%
mush/tests/test_async_runner.py        0      0   100%
mush/tests/test_callpoints.py          0      0   100%
mush/tests/test_context.py             0      0   100%
mush/typing.py                         0      0   100%
------------------------------------------------------
TOTAL                                  0      0   100%

...but I guess that makes sense in the context of the ellipsis causing all lines to be excluded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingexclude

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions