Skip to content

Commit 5066d98

Browse files
committed
Revert "Skip flakky CI tests"
This reverts commit be4f0ba.
1 parent be4f0ba commit 5066d98

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

testing/test_faulthandler.py

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

44
import io
5+
import os
56
import sys
67

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

7374

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-
)
75+
@pytest.mark.parametrize("enabled", [True, False])
8376
def test_timeout(pytester: Pytester, enabled: bool) -> None:
8477
"""Test option to dump tracebacks after a certain timeout.
8578
8679
If faulthandler is disabled, no traceback will be dumped.
8780
"""
81+
if enabled and "CI" in os.environ:
82+
pytest.xfail(reason="sometimes crashes on CI (#7022)")
83+
8884
pytester.makepyfile(
8985
"""
9086
import os, time
@@ -110,10 +106,12 @@ def test_timeout():
110106
assert result.ret == 0
111107

112108

113-
@pytest.mark.skip(reason="sometimes crashes on CI (#7022)")
114109
@pytest.mark.parametrize("exit_on_timeout", [True, False])
115110
def test_timeout_and_exit(pytester: Pytester, exit_on_timeout: bool) -> None:
116111
"""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+
117115
pytester.makepyfile(
118116
"""
119117
import os, time

0 commit comments

Comments
 (0)