mirror of https://github.com/tiangolo/fastapi.git
Make pytest ignore py312 files for older py
This commit is contained in:
parent
5d7dbf8b1a
commit
1dbb6048ca
|
|
@ -0,0 +1,4 @@
|
|||
import sys
|
||||
|
||||
if sys.version_info < (3, 12):
|
||||
collect_ignore_glob = ["*_py312.py"]
|
||||
|
|
@ -4,6 +4,7 @@ from typing import Annotated
|
|||
|
||||
from fastapi import Depends, FastAPI
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from .utils import needs_py312
|
||||
|
||||
|
||||
|
|
@ -19,7 +20,7 @@ def test_pep695_type_dependencies():
|
|||
app = FastAPI()
|
||||
|
||||
@app.get("/")
|
||||
async def get_with_dep(value: DependedValue) -> str:
|
||||
async def get_with_dep(value: DependedValue) -> str: # noqa
|
||||
return f"value: {value}"
|
||||
|
||||
client = TestClient(app)
|
||||
Loading…
Reference in New Issue