Improve parse_raw_prompt test cases for invalid input .v2 (#30512)
Signed-off-by: Kayvan Mivehnejad <K.Mivehnejad@gmail.com>
This commit is contained in:
committed by
GitHub
parent
dc7fb5bebe
commit
29f7d97715
@@ -34,6 +34,13 @@ INPUTS_SLICES = [
|
||||
]
|
||||
|
||||
|
||||
# Test that a nested mixed-type list of lists raises a TypeError.
|
||||
@pytest.mark.parametrize("invalid_input", [[[1, 2], ["foo", "bar"]]])
|
||||
def test_invalid_input_raise_type_error(invalid_input):
|
||||
with pytest.raises(TypeError):
|
||||
parse_raw_prompts(invalid_input)
|
||||
|
||||
|
||||
def test_parse_raw_single_batch_empty():
|
||||
with pytest.raises(ValueError, match="at least one prompt"):
|
||||
parse_raw_prompts([])
|
||||
|
||||
Reference in New Issue
Block a user