Allow excluding entire modules/packages

Issue #118 closed
Ram Rachum
created an issue

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 file will cause the entire package, (including any submodules, subpackages, etc.) not to be measured.

Comments (4)

  1. Ned Batchelder repo owner

    I haven't looked into what it would take to implement this. Ram's original proposal included a new pragma for to exclude the whole package. That would need to be different than the pragma for a single module, I think.

  2. Log in to comment