diff --git a/tests/unit_tests/test_server_client.py b/tests/unit_tests/test_server_client.py index 6a437228..39d0ee32 100644 --- a/tests/unit_tests/test_server_client.py +++ b/tests/unit_tests/test_server_client.py @@ -57,7 +57,7 @@ from langsmith import schemas as ls_schemas from langsmith.client import Client from langsmith.schemas import FeedbackIngestToken -from pydantic import BaseModel, Field +from pydantic import BaseModel, Field, __version__ from pytest import MonkeyPatch from pytest_mock import MockerFixture from typing_extensions import Annotated, TypedDict @@ -77,6 +77,8 @@ from tests.unit_tests.utils.stubs import _AnyIdAIMessage from tests.unit_tests.utils.tracer import FakeTracer +PYDANTIC_VERSION = tuple(map(int, __version__.split("."))) + def _decode_eventstream(text: str) -> List[Dict[str, Any]]: """Simple decoder for testing purposes. @@ -1560,11 +1562,6 @@ async def add_two(y: int) -> int: } -from pydantic import __version__ - -PYDANTIC_VERSION = tuple(map(int, __version__.split("."))) - - async def test_input_schema_typed_dict() -> None: class InputType(TypedDict): foo: str