File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change 2
2
from __future__ import annotations
3
3
4
4
import io
5
+ import os
5
6
import sys
6
7
7
8
from _pytest .pytester import Pytester
@@ -71,20 +72,15 @@ def test_disabled():
71
72
assert result .ret == 0
72
73
73
74
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 ])
83
76
def test_timeout (pytester : Pytester , enabled : bool ) -> None :
84
77
"""Test option to dump tracebacks after a certain timeout.
85
78
86
79
If faulthandler is disabled, no traceback will be dumped.
87
80
"""
81
+ if enabled and "CI" in os .environ :
82
+ pytest .xfail (reason = "sometimes crashes on CI (#7022)" )
83
+
88
84
pytester .makepyfile (
89
85
"""
90
86
import os, time
@@ -110,10 +106,12 @@ def test_timeout():
110
106
assert result .ret == 0
111
107
112
108
113
- @pytest .mark .skip (reason = "sometimes crashes on CI (#7022)" )
114
109
@pytest .mark .parametrize ("exit_on_timeout" , [True , False ])
115
110
def test_timeout_and_exit (pytester : Pytester , exit_on_timeout : bool ) -> None :
116
111
"""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
+
117
115
pytester .makepyfile (
118
116
"""
119
117
import os, time
You can’t perform that action at this time.
0 commit comments