You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just tried to use coverage-conditional-plugin by following the README, however pytest-cov was still reporting less than 100% coverage.
After going down a rabbit hole of thinking that my pyproject.toml settings weren't being picked up (eg the plugin not being activated, or similar), I discovered that the cause was that my pragma rules were inverted.
In addition to fixing this example, maybe it's worth adding the `pragma: some` means `pragma: no cover if some` explanation to the README too? (Given I'm not the first person to be confused about this, given #179 etc) :-)
The text was updated successfully, but these errors were encountered:
I just tried to use
coverage-conditional-plugin
by following the README, however pytest-cov was still reporting less than 100% coverage.After going down a rabbit hole of thinking that my
pyproject.toml
settings weren't being picked up (eg the plugin not being activated, or similar), I discovered that the cause was that mypragma
rules were inverted.I'd used:
Instead of:
I only discovered this by chance, after seeing:
#179 (comment)
I'd followed the docs, however they appear to have the example inverted too:
coverage-conditional-plugin/README.md
Lines 64 to 87 in 22c1093
In addition to fixing this example, maybe it's worth adding the
`pragma: some` means `pragma: no cover if some`
explanation to the README too? (Given I'm not the first person to be confused about this, given #179 etc) :-)The text was updated successfully, but these errors were encountered: