feat: 合约撮合 HTTP 接口自动化测试(unittest 数据驱动)
CI / test (push) Canceled after 4m26s

This commit is contained in:
WbiubiuW
2026-09-22 14:28:42 +08:00
commit b8a74f203a
69 changed files with 2413 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
"""YAML 测试数据读取器(数据驱动的数据面)。"""
import os
import yaml
ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
def read_yaml(filepath):
"""读取 YAML 文件并返回解析后的 dict。
:param filepath: YAML 文件路径(绝对路径,或相对工程根目录的路径)
"""
if not os.path.isabs(filepath):
filepath = os.path.join(ROOT_DIR, filepath)
with open(filepath, encoding="utf-8") as f:
return yaml.safe_load(f.read())