Skip to content

Allow excluding entire modules/packagesΒ #118

@nedbat

Description

@nedbat

Originally reported by Ram Rachum (Bitbucket: coolrr, GitHub: coolrr)


Allow excluding entire modules/packages from coverage measurement by including some identifiable string in their source, similarly to "pragma: no cover".

Here's a suggestion on how to do this, feel free to suggest alternatives: A line "pragma: no module cover" in a module will cause it not to be measured. A "pragma: no package cover" in an __init__.py file will cause the entire package, (including any submodules, subpackages, etc.) not to be measured.


Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions