Skip to content

Commit

Permalink
chore: Suppress insufficient coverage pytest warning (#798)
Browse files Browse the repository at this point in the history
This is emitted by `pytest-cov` [[1]] and is turned into an error by
the default `-Werror` passed to Python, not the `filterwarnings`
setting within the `pytest`.

The patch selectively suppresses the warning so there's nothing to
turn into an error in the first place. Insufficient coverage still
marks the test session as failed as it's supposed to.

[1]: pytest-dev/pytest-cov#675
  • Loading branch information
webknjaz authored Jan 30, 2025
1 parent 4b0ad90 commit dfbde65
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ commands =
{[python-cli-options]byte-errors} \
{[python-cli-options]max-isolation} \
{[python-cli-options]warnings-to-errors} \
-W 'ignore:Coverage failure::pytest_cov.plugin' \
-m pytest \
{tty:--color=yes} \
{posargs:--cov-report=html:{envtmpdir}{/}htmlcov{/}}
Expand Down

0 comments on commit dfbde65

Please sign in to comment.