chore: 初始化版本控制,添加 .gitignore 纳入撮合自动化测试工程

This commit is contained in:
2026-09-19 23:10:32 +08:00
commit cb7b49a4de
31 changed files with 2160 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())