From b722f7003d8ce163368f4a586b5670fa5ae57a66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sviatoslav=20Sydorenko=20=28=D0=A1=D0=B2=D1=8F=D1=82=D0=BE?= =?UTF-8?q?=D1=81=D0=BB=D0=B0=D0=B2=20=D0=A1=D0=B8=D0=B4=D0=BE=D1=80=D0=B5?= =?UTF-8?q?=D0=BD=D0=BA=D0=BE=29?= Date: Fri, 13 Sep 2024 21:57:06 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=AA=20Unmeasure=20coverage=20in=20test?= =?UTF-8?q?s=20expected=20to=20fail=20(#15512)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These tests are known to only be executed partially or not at all. So we always get incomplete, missing, and sometimes flaky, coverage in the test functions that are expected to fail. This change updates the ``coverage.py`` config to prevent said tests from influencing the coverage level measurement. Ref https://github.com/pytest-dev/pytest/pull/12531 --- .coveragerc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.coveragerc b/.coveragerc index f9ef3447bf..d06848ae15 100644 --- a/.coveragerc +++ b/.coveragerc @@ -23,6 +23,8 @@ exclude_lines = if 0: if __name__ == .__main__.: + ^\s*@pytest\.mark\.xfail + ignore_errors = True [xml]