Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkLight1337 committed Sep 13, 2024
1 parent fbf878a commit 1b8f568
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/engine/test_skip_tokenizer_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ def test_skip_tokenizer_initialization(model: str):
# token ids.
llm = LLM(model=model, skip_tokenizer_init=True)
sampling_params = SamplingParams(prompt_logprobs=True, detokenize=True)
with pytest.raises(ValueError) as err:

with pytest.raises(ValueError, match="cannot pass text prompts when"):
llm.generate("abc", sampling_params)
assert "prompts must be None if" in str(err.value)

outputs = llm.generate({"prompt_token_ids": [1, 2, 3]},
sampling_params=sampling_params)
assert len(outputs) > 0
Expand Down

0 comments on commit 1b8f568

Please sign in to comment.