Browse Source

Tweak test for Python 3.8

pull/14482/head
Sebastián Ramírez 7 months ago
parent
commit
9c290a7dbd
  1. 7
      tests/test_arbitrary_types.py

7
tests/test_arbitrary_types.py

@ -1,9 +1,10 @@
from typing import Annotated
from typing import List
import pytest
from fastapi import FastAPI
from fastapi.testclient import TestClient
from inline_snapshot import snapshot
from typing_extensions import Annotated
from .utils import needs_pydanticv2
@ -24,7 +25,7 @@ def get_client():
FakeNumpyArrayPydantic = Annotated[
FakeNumpyArray,
WithJsonSchema(TypeAdapter(list[float]).json_schema()),
WithJsonSchema(TypeAdapter(List[float]).json_schema()),
PlainSerializer(lambda v: v.data),
]
@ -65,7 +66,7 @@ def test_typeadapter():
FakeNumpyArrayPydantic = Annotated[
FakeNumpyArray,
WithJsonSchema(TypeAdapter(list[float]).json_schema()),
WithJsonSchema(TypeAdapter(List[float]).json_schema()),
PlainSerializer(lambda v: v.data),
]

Loading…
Cancel
Save