refactor(models): 优化项目

- 重构assert_all
- 优化目录结构
This commit is contained in:
2025-02-28 17:48:20 +08:00
parent bc55dffe40
commit 1890918312
14 changed files with 250 additions and 67 deletions

View File

@@ -12,10 +12,10 @@
import logging
import yaml
from commons.models import CaseInfo
logger = logging.getLogger(__name__)
class YamlFile(dict):
def __init__(self, path):
super().__init__()
@@ -34,10 +34,13 @@ class YamlFile(dict):
dict(self),
stream=f,
allow_unicode=True, # allow_unicode使用unicode编码正常显示中文
sort_keys=False) # sort_keys保持原有排序
sort_keys=False # sort_keys保持原有排序
)
if __name__ == '__main__':
from commons.models import CaseInfo
yaml_path = r'E:\PyP\InterfaceAutoTest\TestCases\test_1_user.yaml'
yaml_file = YamlFile(yaml_path)
# yaml_file.load()