Skip to content

Commit 634ffcc

Browse files
committed
skip test only on CI
1 parent 65ef53f commit 634ffcc

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

testing/test_faulthandler.py

Lines changed: 7 additions & 2 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
@@ -76,7 +77,10 @@ def test_disabled():
7677
"enabled",
7778
[
7879
pytest.param(
79-
True, marks=pytest.mark.skip(reason="sometimes crashes on CI (#7022)")
80+
True,
81+
marks=pytest.mark.skipif(
82+
"CI" in os.environ, reason="sometimes crashes on CI (#7022)"
83+
),
8084
),
8185
False,
8286
],
@@ -111,7 +115,8 @@ def test_timeout():
111115
assert result.ret == 0
112116

113117

114-
@pytest.mark.skip(reason="sometimes crashes on CI (#7022)")
118+
@pytest.mark.keep_ci_var
119+
@pytest.mark.skipif("CI" in os.environ, reason="sometimes crashes on CI (#7022)")
115120
@pytest.mark.parametrize("exit_on_timeout", [True, False])
116121
def test_timeout_and_exit(pytester: Pytester, exit_on_timeout: bool) -> None:
117122
"""Test option to force exit pytest process after a certain timeout."""

0 commit comments

Comments
 (0)