Skip to content

Report covered 'no-cover' lines #251

@nedbat

Description

@nedbat

Originally reported by Anonymous


It is often the case that a feature will be added in one commit, but there isn't any client code that calls a particular method yet. As such, the method is marked

pragma: no cover

coverage passes and everyone continues along their merry way.

Later, when client code is added that exercises that code path, it would be nice if coverage.py could complain saying something like
"WARNING: Block marked 'no cover' actually covered. You may want to remove the pragma."
That way, we could continually make sure that the minimum amount of code is under 'no cover' pragmas.


Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestopinions neededNot sure how coverage.py should behave. Chime in!

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions