refactor(models): 优化项目
- 重构assert_all - 优化目录结构
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user