Skip to content

Commit eb988ce

Browse files
cmaloneyclaude
andcommitted
Don't report test_asdasd crash to the GitHub job summary
test_run_failed_module_live runs a nested regrtest that is expected to crash; unset GITHUB_STEP_SUMMARY so it doesn't land in the CI summary. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 116d8d3 commit eb988ce

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎Lib/test/test_profiling/test_sampling_profiler/test_live_collector_ui.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import unittest
1313
from unittest import mock
1414
from test.support import requires, requires_remote_subprocess_debugging
15+
from test.support import os_helper
1516
from test.support.import_helper import import_module
1617

1718
# Only run these tests if curses is available
@@ -870,8 +871,11 @@ def test_run_failed_module_live(self):
870871
),
871872
mock.patch('curses.wrapper', side_effect=self.mock_curses_wrapper),
872873
mock.patch("sys.argv", args),
873-
mock.patch('sys.stderr', new=io.StringIO()) as fake_stderr
874+
mock.patch('sys.stderr', new=io.StringIO()) as fake_stderr,
875+
os_helper.EnvironmentVarGuard() as env,
874876
):
877+
# Don't report the crash to the CI running this test
878+
env.unset('GITHUB_STEP_SUMMARY')
875879
main()
876880
self.assertIn(
877881
'test test_asdasd crashed -- Traceback (most recent call last):',

0 commit comments

Comments
 (0)