HTML 原文 · 完整 Markdown · 纯文本 · 分段目录 · ← 上一段 · 下一段 →
第 19 / 26 段:搭好异步测试基础设施
FastAPI 工程化实践 · 发布 2026-03-28 · 更新 2026-11-11 · 标签:FastAPI、Testing、Ruff、DX
asyncio_mode = "auto" 之后,async def test_* 不再需要每次加 @pytest.mark.asyncio。
asyncio_mode = "auto"
async def test_*
@pytest.mark.asyncio