Public API

Plugin for Coverage.py to selectively ignore branches depending on the Python version.

Data:

DSL_EXCLUDE

Compiled regular expression to match comments in the # pragma: no cover (XXX), where XXX is an expression to be evaluated to determine whether the line should be excluded from coverage.

Functions:

evaluate_exclude(expression)

Evaluate the given expression to determine whether the line should be excluded from coverage.

DSL_EXCLUDE

Type:    Pattern

Compiled regular expression to match comments in the # pragma: no cover (XXX), where XXX is an expression to be evaluated to determine whether the line should be excluded from coverage.

New in version 0.2.4.

Pattern

.*#\s*pragma|PRAGMA[:\s]?\s*no|NO\s*cover|COVER\s*((.*))

evaluate_exclude(expression)[source]

Evaluate the given expression to determine whether the line should be excluded from coverage.

New in version 0.2.4.

Parameters

expression (str)

Return type

bool