mirror of
https://github.com/fastapi/fastapi.git
synced 2026-05-18 13:27:45 -04:00
📝 Update source examples and docs from Python 3.9 to 3.10 (#14900)
This commit is contained in:
committed by
GitHub
parent
d06ab3f5c7
commit
c9e2277d8b
@@ -12,7 +12,7 @@ from pytest import MonkeyPatch
|
||||
@pytest.fixture(
|
||||
name="mod_name",
|
||||
params=[
|
||||
pytest.param("app01_py39"),
|
||||
pytest.param("app01_py310"),
|
||||
],
|
||||
)
|
||||
def get_mod_name(request: pytest.FixtureRequest):
|
||||
|
||||
@@ -8,8 +8,8 @@ from pytest import MonkeyPatch
|
||||
@pytest.fixture(
|
||||
name="mod_path",
|
||||
params=[
|
||||
pytest.param("app02_py39"),
|
||||
pytest.param("app02_an_py39"),
|
||||
pytest.param("app02_py310"),
|
||||
pytest.param("app02_an_py310"),
|
||||
],
|
||||
)
|
||||
def get_mod_path(request: pytest.FixtureRequest):
|
||||
|
||||
@@ -9,8 +9,8 @@ from pytest import MonkeyPatch
|
||||
@pytest.fixture(
|
||||
name="mod_path",
|
||||
params=[
|
||||
pytest.param("app03_py39"),
|
||||
pytest.param("app03_an_py39"),
|
||||
pytest.param("app03_py310"),
|
||||
pytest.param("app03_an_py310"),
|
||||
],
|
||||
)
|
||||
def get_mod_path(request: pytest.FixtureRequest):
|
||||
|
||||
@@ -5,7 +5,7 @@ from fastapi.testclient import TestClient
|
||||
from pytest import MonkeyPatch
|
||||
|
||||
|
||||
@pytest.fixture(name="app", params=[pytest.param("tutorial001_py39")])
|
||||
@pytest.fixture(name="app", params=[pytest.param("tutorial001_py310")])
|
||||
def get_app(request: pytest.FixtureRequest, monkeypatch: MonkeyPatch):
|
||||
monkeypatch.setenv("ADMIN_EMAIL", "admin@example.com")
|
||||
mod = importlib.import_module(f"docs_src.settings.{request.param}")
|
||||
|
||||
Reference in New Issue
Block a user