From 60619574e3568faa8953b6ac2ddf77a697474c1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 2 Dec 2025 17:53:21 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Tweak=20test=20for=20consistency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_compat.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/test_compat.py b/tests/test_compat.py index 44fcf0404..26537c5ab 100644 --- a/tests/test_compat.py +++ b/tests/test_compat.py @@ -1,7 +1,5 @@ -import sys from typing import Any, Dict, List, Union -import pytest from fastapi import FastAPI, UploadFile from fastapi._compat import ( Undefined, @@ -16,7 +14,7 @@ from fastapi.testclient import TestClient from pydantic import BaseModel, ConfigDict from pydantic.fields import FieldInfo -from .utils import needs_py_lt_314, needs_pydanticv2 +from .utils import needs_py310, needs_py_lt_314, needs_pydanticv2 @needs_pydanticv2 @@ -151,10 +149,7 @@ def test_serialize_sequence_value_with_optional_list(): @needs_pydanticv2 -@pytest.mark.skipif( - sys.version_info < (3, 10), - reason="Requires new union syntax", -) +@needs_py310 def test_serialize_sequence_value_with_optional_list_pipe_union(): """Test that serialize_sequence_value handles optional lists correctly (with new syntax).""" from fastapi._compat import v2