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 22from __future__ import annotations
33
44import io
5+ import os
56import sys
67
78from _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 ])
8376def 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 ])
115110def 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
You can’t perform that action at this time.
0 commit comments