From 91de85a8e65cb3b1cd8f28a11a41b03fe6e95273 Mon Sep 17 00:00:00 2001 From: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com> Date: Tue, 29 Apr 2025 15:55:54 -0700 Subject: [PATCH] fix test --- libs/langgraph/tests/test_pydantic.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libs/langgraph/tests/test_pydantic.py b/libs/langgraph/tests/test_pydantic.py index 625998d01..8298970ba 100644 --- a/libs/langgraph/tests/test_pydantic.py +++ b/libs/langgraph/tests/test_pydantic.py @@ -57,7 +57,7 @@ def test_is_supported_by_pydantic() -> None: assert is_supported_by_pydantic(PydanticModel) is True -def test_nested_pydantic_models(version: str) -> None: +def test_nested_pydantic_models() -> None: """Test that nested Pydantic models are properly constructed from leaf nodes up.""" class NestedModel(BaseModel): @@ -94,10 +94,7 @@ def test_nested_pydantic_models(version: str) -> None: name: str friends: list[str] = Field(default_factory=list) # IDs of friends - if version == "v2": - conlist_type = conlist(item_type=int, min_length=2, max_length=5) - else: - conlist_type = conlist(item_type=int, min_items=2, max_items=5) + conlist_type = conlist(item_type=int, min_length=2, max_length=5) class State(BaseModel): # Basic nested model tests