[Test] Split the chat_utils tests. (#61765)

Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
This commit is contained in:
wang.yuqi
2026-10-15 08:26:22 +00:00
committed by GitHub
parent b965ee564d
commit 0f0bc4dbb1
15 changed files with 3328 additions and 3242 deletions
@@ -0,0 +1,15 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import pytest
from vllm.exceptions import VLLMValidationError
from vllm.renderers.chat_utils import validate_chat_template
def test_validate_chat_template_rejects_invalid_type():
"""A non-str/Path chat_template is invalid user input."""
with pytest.raises(
VLLMValidationError, match="not a valid chat template type"
) as exc_info:
validate_chat_template(123)
assert exc_info.value.parameter == "chat_template"