test: install pyyaml and isolate vllm config file in tests
after rebasing onto main, get_engine_args() loads a vllm-style config via PyYAML (a transitive vllm dep). vllm is stubbed in tests, so add pyyaml explicitly and point VLLM_CONFIG_FILE at a nonexistent path so no stray config is picked up.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
# Test-only dependencies. vllm/torch are stubbed in conftest.py when absent,
|
||||
# so the unit tests run on a plain CPU runner without the GPU image.
|
||||
pytest>=8,<10
|
||||
# get_engine_args() reads a vLLM-style config via PyYAML (a transitive vllm dep
|
||||
# at runtime); install it explicitly here since vllm itself is stubbed.
|
||||
pyyaml
|
||||
|
||||
@@ -94,6 +94,8 @@ class TestGetEngineArgsServedName:
|
||||
# Avoid the network branch in _resolve_max_model_len.
|
||||
monkeypatch.setenv("MAX_NUM_BATCHED_TOKENS", "2048")
|
||||
monkeypatch.delenv("SERVED_MODEL_NAME", raising=False)
|
||||
# Don't pick up a stray vLLM config file from the environment.
|
||||
monkeypatch.setenv("VLLM_CONFIG_FILE", "/nonexistent-vllm-config.yaml")
|
||||
|
||||
@requires_case_sensitive_fs
|
||||
def test_served_name_is_repo_id_when_path_rewritten(self, hf_cache, monkeypatch):
|
||||
|
||||
Reference in New Issue
Block a user