committed by
GitHub
1 changed files with 7 additions and 0 deletions
@ -0,0 +1,7 @@ |
|||||
|
# 测试事件:启动 - 关闭 |
||||
|
|
||||
|
使用 `TestClient` 和 `with` 语句,在测试中运行事件处理器(`startup` 与 `shutdown`)。 |
||||
|
|
||||
|
```Python hl_lines="9-12 20-24" |
||||
|
{!../../../docs_src/app_testing/tutorial003.py!} |
||||
|
``` |
Loading…
Reference in new issue