From 8838f99ed3bcdd7d10b41db29f79e6ef2974cf08 Mon Sep 17 00:00:00 2001 From: Hongming Wang Date: Fri, 1 May 2026 18:31:21 -0700 Subject: [PATCH] chore(tests): drop redundant local _reset fixture from test_runtime_wedge MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #2475 promoted runtime_wedge reset to an autouse conftest fixture in workspace/tests/conftest.py covering every test in this directory. The local @pytest.fixture(autouse=True) _reset in test_runtime_wedge.py became dead-but-harmless (idempotent reset is idempotent — both fixtures ran on every test, double-resetting). Remove the local copy so future maintainers don't have to keep two definitions in sync. Caught during a deeper /code-review-and-quality pass on the #2475 follow-ups — the original PR landed the conftest fixture but missed the dedup of the now-redundant in-file fixture. Co-Authored-By: Claude Opus 4.7 (1M context) --- workspace/tests/test_runtime_wedge.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/workspace/tests/test_runtime_wedge.py b/workspace/tests/test_runtime_wedge.py index e9cdbd20..0183d788 100644 --- a/workspace/tests/test_runtime_wedge.py +++ b/workspace/tests/test_runtime_wedge.py @@ -5,21 +5,15 @@ to its template repo without breaking heartbeat. The behavior is identical to the prior in-executor implementation; tests pin the contract so the re-export shim in claude_sdk_executor.py can -later be deleted without surprise.""" -import pytest +later be deleted without surprise. +Cross-test isolation is provided by the autouse +`_reset_runtime_wedge_between_tests` fixture in workspace/tests/conftest.py +— this file does not need a local reset fixture. +""" import runtime_wedge -@pytest.fixture(autouse=True) -def _reset(): - """Each test starts with a clean wedge state — production wedges are - sticky-per-process, but cross-test bleed would couple unrelated cases.""" - runtime_wedge.reset_for_test() - yield - runtime_wedge.reset_for_test() - - class TestRuntimeWedge: def test_starts_unwedged(self): assert runtime_wedge.is_wedged() is False