From 0f554ce19ea8bf677bb1e96b919c2b0692ac239d Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Sun, 26 Jul 2026 16:40:42 -0700 Subject: [PATCH] test(gateway): drop source-reading guard test from #71671 salvage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Source-regex tests are banned (AGENTS.md 'Never read source code in tests') — keep only the behavioral regression test. --- .../emails/hereicq@users.noreply.github.com | 1 + tests/gateway/test_71671_faulthandler_no_stderr.py | 13 ------------- 2 files changed, 1 insertion(+), 13 deletions(-) create mode 100644 contributors/emails/hereicq@users.noreply.github.com diff --git a/contributors/emails/hereicq@users.noreply.github.com b/contributors/emails/hereicq@users.noreply.github.com new file mode 100644 index 000000000000..e2eb89a005fb --- /dev/null +++ b/contributors/emails/hereicq@users.noreply.github.com @@ -0,0 +1 @@ +hereicq diff --git a/tests/gateway/test_71671_faulthandler_no_stderr.py b/tests/gateway/test_71671_faulthandler_no_stderr.py index a01e14e1ee56..7548ef548522 100644 --- a/tests/gateway/test_71671_faulthandler_no_stderr.py +++ b/tests/gateway/test_71671_faulthandler_no_stderr.py @@ -3,7 +3,6 @@ from __future__ import annotations import faulthandler -import os import sys import pytest @@ -33,15 +32,3 @@ def test_faulthandler_enable_falls_back_when_stderr_is_none(tmp_path): sys.stderr = real_stderr if was_enabled: faulthandler.enable() - - -def test_gateway_run_keeps_faulthandler_guard(): - src = os.path.join( - os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))), - "gateway", "run.py", - ) - with open(src, encoding="utf-8") as f: - text = f.read() - assert "try:\n faulthandler.enable()\n except (RuntimeError, ValueError, OSError):" in text, ( - "gateway/run.py must keep the try/except guard around faulthandler.enable() (see #71671)" - )