Skip to content

Commit be4f0ba

Browse files
committed
Skip flakky CI tests
1 parent d3274b1 commit be4f0ba

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

testing/test_faulthandler.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from __future__ import annotations
33

44
import io
5-
import os
65
import sys
76

87
from _pytest.pytester import Pytester
@@ -72,15 +71,20 @@ def test_disabled():
7271
assert result.ret == 0
7372

7473

75-
@pytest.mark.parametrize("enabled", [True, False])
74+
@pytest.mark.parametrize(
75+
"enabled",
76+
[
77+
pytest.param(
78+
True, marks=pytest.mark.skip(reason="sometimes crashes on CI (#7022)")
79+
),
80+
False,
81+
],
82+
)
7683
def test_timeout(pytester: Pytester, enabled: bool) -> None:
7784
"""Test option to dump tracebacks after a certain timeout.
7885
7986
If faulthandler is disabled, no traceback will be dumped.
8087
"""
81-
if enabled and "CI" in os.environ:
82-
pytest.xfail(reason="sometimes crashes on CI (#7022)")
83-
8488
pytester.makepyfile(
8589
"""
8690
import os, time
@@ -106,12 +110,10 @@ def test_timeout():
106110
assert result.ret == 0
107111

108112

113+
@pytest.mark.skip(reason="sometimes crashes on CI (#7022)")
109114
@pytest.mark.parametrize("exit_on_timeout", [True, False])
110115
def test_timeout_and_exit(pytester: Pytester, exit_on_timeout: bool) -> None:
111116
"""Test option to force exit pytest process after a certain timeout."""
112-
if "CI" in os.environ:
113-
pytest.xfail(reason="sometimes crashes on CI (#7022)")
114-
115117
pytester.makepyfile(
116118
"""
117119
import os, time

0 commit comments

Comments
 (0)