Skip to content

Commit c4f6a29

Browse files
committed
Added a test for invalid inputs for parse_raw_prompts
Signed-off-by: Kayvan Mivehnejad <[email protected]>
1 parent bbd850e commit c4f6a29

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/test_inputs.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@
3333
slice(None, None, -2),
3434
]
3535

36+
@pytest.mark.parametrize(
37+
"invalid_input",
38+
[
39+
["foo", 1], # mixed of string and token
40+
[["foo"], ["bar"]] # list of list of strings
41+
]
42+
)
43+
def test_invalid_input_raise_type_error(invalid_input):
44+
with pytest.raises(TypeError):
45+
parse_raw_prompts(invalid_input)
3646

3747
# Test that a nested mixed-type list of lists raises a TypeError.
3848
@pytest.mark.parametrize("invalid_input", [[[1, 2], ["foo", "bar"]]])

0 commit comments

Comments
 (0)