From f4fa4e8f6dab8fb99443e4db0ee9e3fe055656a5 Mon Sep 17 00:00:00 2001 From: James Braza Date: Fri, 6 Sep 2024 11:00:42 -0700 Subject: [PATCH] Updated JSON schema assertions for Pydantic 2.9 --- tests/test_agents.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/test_agents.py b/tests/test_agents.py index e2447226..195b6579 100644 --- a/tests/test_agents.py +++ b/tests/test_agents.py @@ -454,13 +454,13 @@ async def test_agent_grad(self, dummy_env: DummyEnv, model_name: str) -> None: " And despite that there is a multiline argument" ' description.","title":"Y","type":"null"},"union":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"I' " am a union and the current year is" - ' {current_year}.","title":"Union"},"pydantic_model":{"allOf":[{"$ref":"#/$defs/StubState"}],"description":"I' + ' {current_year}.","title":"Union"},"pydantic_model":{"$ref":"#/$defs/StubState","description":"I' " am a Pydantic" ' model."},"basic_dict":{"additionalProperties":{"type":"integer"},"description":"I' ' am a dictionary with primitive values.","title":"Basic' ' Dict","type":"object"},"complex_dict":{"additionalProperties":{"maxItems":2,"minItems":2,"prefixItems":[{"type":"string"},{"type":"integer"}],"type":"array"},"description":"I' ' am a dictionary with complex values.","title":"Complex' - ' Dict","type":"object"},"enum":{"allOf":[{"$ref":"#/$defs/StubEnum"}],"description":"I' + ' Dict","type":"object"},"enum":{"$ref":"#/$defs/StubEnum","description":"I' " am an" ' enum."},"defaulted_str":{"default":"default","description":"I' ' have a string default value.","title":"Defaulted' @@ -500,16 +500,14 @@ async def test_agent_grad(self, dummy_env: DummyEnv, model_name: str) -> None: " am null. And despite that there is a multiline argument" " description.YnullintegernullI" " am a union and the current year is" - " {current_year}.Union#/$defs/StubStateI' - " am a Pydantic" + " {current_year}.Union#/$defs/StubStateI am a Pydantic' " model.integerI" " am a dictionary with primitive values.Basic" " Dictobject22stringintegerarrayI" " am a dictionary with complex values.Complex" - " Dictobject#/$defs/StubEnumI' - " am an" + " Dictobject#/$defs/StubEnumI am an' " enum.defaultI" " have a string default value.Defaulted" " Strstring1.0I"