From f6fcf04063ebd41760492cc6d023cbb70c685ec6 Mon Sep 17 00:00:00 2001 From: Matt Date: Fri, 24 May 2024 16:59:56 +0100 Subject: [PATCH] Quick test fixes --- tests/utils/test_chat_template_utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/utils/test_chat_template_utils.py b/tests/utils/test_chat_template_utils.py index c1b503afa5b2bf..e795468996b91a 100644 --- a/tests/utils/test_chat_template_utils.py +++ b/tests/utils/test_chat_template_utils.py @@ -137,7 +137,7 @@ def fn(x: List[List[Union[str, int]]]): "properties": { "x": { "type": "array", - "items": {"type": "array", "items": {"type": ["integer", "string"]}}, + "items": {"type": "array", "items": {"type": ["string", "integer"]}}, "description": "The input", } }, @@ -418,7 +418,7 @@ def fn(x: int, y: int): def test_everything_all_at_once(self): def fn( - x: str, y: Optional[List[Union[int, str]]], z: Tuple[Union[int, str], str] = (42, "hello") + x: str, y: Optional[List[Union[str, int]]], z: Tuple[Union[str, int], str] = (42, "hello") ) -> Tuple[int, str]: """ Test function with multiple args, and docstring args that we have to strip out. @@ -448,13 +448,13 @@ def fn( "x": {"type": "string", "description": "The first input. It's got a big multiline"}, "y": { "type": "array", - "items": {"type": ["integer", "string"]}, + "items": {"type": ["string", "integer"]}, "nullable": True, "description": "The second input. It's a big list with a single-line description.", }, "z": { "type": "array", - "prefixItems": [{"type": ["integer", "string"]}, {"type": "string"}], + "prefixItems": [{"type": ["string", "integer"]}, {"type": "string"}], "description": "The third input. It's some kind of tuple with a default arg.", }, },