main
py 27 lines 759 Bytes
Raw
1 # SPDX-License-Identifier: Apache-2.0
2 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3 """Unit tests for MultiModalRegistry.supports_multimodal_inputs and
4 Qwen2.5-VL visual component loading behavior.
5 """
6
7 from types import SimpleNamespace
8
9 import pytest
10
11 from vllm.multimodal import MULTIMODAL_REGISTRY
12
13 pytestmark = pytest.mark.cpu_test
14
15
16 def test_create_processor_error_uses_served_model_name():
17 model_config = SimpleNamespace(
18 is_multimodal_model=False,
19 model="/path/to/model/weights",
20 served_model_name="friendly-model-name",
21 )
22
23 with pytest.raises(
24 ValueError,
25 match="friendly-model-name is not a multimodal model",
26 ):
27 MULTIMODAL_REGISTRY.create_processor(model_config)