示例工程 29-testing-pytest

29-testing-pytest/04-patch-target/data_service.py

python · 0.2 KB

"""在模块顶层导入 fetch,演示 patch 的「使用处」语义。"""
 
from __future__ import annotations
 
from data_client import fetch
 
 
def get_data() -> str:
    return fetch()