@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 5001211369
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 8, 11:15 UTC

[ROCm] [CI] fix test_unrecognized_env (#34350)

Signed-off-by: tjtanaa <tunjian.tan@embeddedllm.com>

TJian committed Feb 12, 2026 at 02:50 UTC 500121136995ff0b261f4d2f68e4831896e32d63
1 file changed +10 -3
tests/config/test_config_generation.py
+10 -3
@@ -80,12 +80,19 @@ def test_ray_runtime_env(monkeypatch: pytest.MonkeyPatch):
80 ray.shutdown()
81
82
83 -def test_unrecognized_env():
83 +def test_unrecognized_env(monkeypatch):
84 import os
85
86 + from vllm.envs import environment_variables
87 +
88 + # Remove any existing unrecognized VLLM env vars that might interfere
89 + for env in list(os.environ):
90 + if env.startswith("VLLM_") and env not in environment_variables:
91 + monkeypatch.delenv(env, raising=False)
92 +
93 # Test that if fail_on_environ_validation is True, then an error
94 # is raised when an unrecognized vLLM environment variable is set
88 - os.environ["VLLM_UNRECOGNIZED_ENV_VAR"] = "some_value"
95 + monkeypatch.setenv("VLLM_UNRECOGNIZED_ENV_VAR", "some_value")
96 engine_args = EngineArgs(
97 fail_on_environ_validation=True,
98 )
@@ -97,7 +104,7 @@ def test_unrecognized_env():
104 engine_args.create_engine_config()
105
106 # Test that when the unrecognized env var is removed, no error is raised
100 - os.environ.pop("VLLM_UNRECOGNIZED_ENV_VAR", None)
107 + monkeypatch.delenv("VLLM_UNRECOGNIZED_ENV_VAR")
108 engine_args = EngineArgs(
109 fail_on_environ_validation=True,
110 )