You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original comment byAlexander Walters (Bitbucket: sdamon, GitHub: sdamon)
The referenced issue is resolved, and I have not seen empty files as being reported. Coverage covers lines, if there are no lines, then there is nothing to hit or miss with. I think you have stumbled onto either a new bug or found some smell in your own code.
@sdamon Issue #1 was about empty files claiming to have one statement, the fix made them have zero statements, but they are still reported. I suspect @blueyed is using the --source option, which makes completely unexecuted files appear in reports. I like the idea of skipping empty files if they are pulled in via the --source switch.
Changeset b7762d1a6614 (bb) introduces the report --skip-covered option, which will skip any file with 100% coverage. Since empty __init__.py files are 100% covered, does this satisfy your use case?
Originally reported by Daniel Hahler (Bitbucket: blueyed, GitHub: blueyed)
It would be nice if empty files (especially
__init__.py
) could be ignored, e.g. via an optionomit-empty
.Ref: #1/empty-__init__py-files-are-reported-as-1
The text was updated successfully, but these errors were encountered: