vllm/tests/entrypoints/llm/test_prompt_validation.py

10 lines
186 B
Python
Raw Normal View History

import pytest
from vllm import LLM
def test_empty_prompt():
llm = LLM(model="gpt2")
with pytest.raises(ValueError, match='Prompt cannot be empty'):
llm.generate([""])