Skip to content

Commit a4e8e78

Browse files
committed
Adapt tests to pytest 9 output format
1 parent 82050dd commit a4e8e78

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

testing/test_xfail_behavior.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
FAILED_WORD = "FAILED" if IS_PYTEST4_PLUS else "FAIL"
99
PYTEST_GTE_7_2 = hasattr(pytest, "version_tuple") and pytest.version_tuple >= (7, 2) # type: ignore[attr-defined]
1010
PYTEST_GTE_8_0 = hasattr(pytest, "version_tuple") and pytest.version_tuple >= (8, 0) # type: ignore[attr-defined]
11+
PYTEST_GTE_9_0 = hasattr(pytest, "version_tuple") and pytest.version_tuple >= (9, 0) # type: ignore[attr-defined]
1112

1213
pytestmark = pytest.mark.skipif( # pylint: disable=invalid-name
1314
not hasattr(os, "fork"), # noqa: WPS421
@@ -72,6 +73,8 @@ def test_xfail(is_crashing, is_strict, testdir):
7273
)
7374
if expected_lowercase == "xfailed" and PYTEST_GTE_7_2:
7475
short_test_summary += " - " + reason_string
76+
if expected_lowercase == "failed" and PYTEST_GTE_9_0:
77+
short_test_summary += " - [XPASS(strict)] The process gets termin..."
7578
total_summary_line = f"*==== 1 {expected_lowercase!s} in 0.*s* ====*"
7679

7780
expected_lines = (

0 commit comments

Comments
 (0)