From 1392e4b8575c134313142c7f9abce4963a63aa96 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Fri, 4 Sep 2026 00:53:42 -0700 Subject: [PATCH] test: modal integration test imports terminal helpers from their defining modules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It side-loaded tools/terminal_tool.py via importlib.spec_from_file_location under the bare name 'terminal_tool', which bypassed both the package and scripts/check_compat_pointers.py, then read cleanup_vm through the compat pointer. Found by running the suite with HermesPluginCompatWarning promoted to an error — the only in-tree resolution through a pointer across 44,7k tests. --- tests/integration/test_modal_terminal.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/tests/integration/test_modal_terminal.py b/tests/integration/test_modal_terminal.py index 40c7164ffd..024e6053fe 100644 --- a/tests/integration/test_modal_terminal.py +++ b/tests/integration/test_modal_terminal.py @@ -42,17 +42,8 @@ except ImportError: parent_dir = Path(__file__).parent.parent.parent sys.path.insert(0, str(parent_dir)) -# Import terminal_tool module directly using importlib to avoid tools/__init__.py -import importlib.util -terminal_tool_path = parent_dir / "tools" / "terminal_tool.py" -spec = importlib.util.spec_from_file_location("terminal_tool", terminal_tool_path) -terminal_module = importlib.util.module_from_spec(spec) -spec.loader.exec_module(terminal_module) - -terminal_tool = terminal_module.terminal_tool -check_terminal_requirements = terminal_module.check_terminal_requirements -_get_env_config = terminal_module._get_env_config -cleanup_vm = terminal_module.cleanup_vm +from tools.terminal_tool import terminal_tool, check_terminal_requirements, _get_env_config # noqa: E402 +from tools.terminal_tool_lifecycle import cleanup_vm # noqa: E402 def test_modal_requirements():