From bbfa7176a6a3686a88ee66696f1ad8d754559d96 Mon Sep 17 00:00:00 2001 From: Gahow Wang Date: Sat, 11 Jul 2026 22:38:08 +0800 Subject: [PATCH 5/5] Keep compile-factor regression import-light --- tests/v1/core/test_opprof.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/v1/core/test_opprof.py b/tests/v1/core/test_opprof.py index a820e7e..0b8a8a1 100644 --- a/tests/v1/core/test_opprof.py +++ b/tests/v1/core/test_opprof.py @@ -37,6 +37,7 @@ def test_output_dir_is_not_a_compile_factor(monkeypatch: pytest.MonkeyPatch): config_utils = ModuleType("vllm.config.utils") config_utils.__dict__["normalize_value"] = lambda value: value monkeypatch.setitem(sys.modules, "vllm.config.utils", config_utils) + monkeypatch.setitem(sys.modules, "torch", ModuleType("torch")) monkeypatch.setenv("VLLM_OPPROF_DIR", "/tmp/opprof") assert "VLLM_OPPROF_DIR" not in envs.compile_factors() -- 2.43.0