docs: 为全部代码补充中文注释并加入 AGENTS 注释规范
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
"""uvicorn 冒烟测试。
|
||||
|
||||
用真实套接字启动 uvicorn 服务并请求 /health,验证应用能脱离 TestClient
|
||||
在实际 Web 服务环境中正常工作。
|
||||
"""
|
||||
|
||||
import threading
|
||||
import time
|
||||
import urllib.request
|
||||
@@ -8,6 +14,7 @@ from app.main import app
|
||||
|
||||
|
||||
def test_uvicorn_serves_app_over_real_socket() -> None:
|
||||
"""验证 uvicorn 监听真实端口后健康检查可用。"""
|
||||
config = Config(app=app, host="127.0.0.1", port=0, log_level="error")
|
||||
server = Server(config)
|
||||
thread = threading.Thread(target=server.run, daemon=True)
|
||||
|
||||
Reference in New Issue
Block a user