Skip to content

Exclude inside block strictly #1994

@ego-thales

Description

@ego-thales

From pytest-dev/pytest-cov#704.

TL;DR: It would be nice to be able to exclude the inside of an if statement from coverage, but not the if statement itself:

if statement:  # pragma: no <requested feature>
    inside_block

This would still report the if line, only the inside would be excluded.

Thanks in advance.

All the best.
Élie

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions