feat(funcs): 优化函数热加载

- 优化函数热加载模块funcs.py(由字典反射改为装饰器)
- 修复bug
This commit is contained in:
2025-03-02 21:47:04 +08:00
parent 1890918312
commit 698a95ac83
10 changed files with 131 additions and 110 deletions

View File

@@ -85,7 +85,7 @@ if __name__ == '__main__':
# print(mock_resp.text)
# print(mock_resp.json())
exchanger = Exchange(r"D:\CNWei\CNW\InterfaceAutoTest\extract.yaml")
exchanger = Exchange(r"E:\PyP\InterfaceAutoTest\extract.yaml")
exchanger.extract(mock_resp, "name", "json", '$.name', 0)
exchanger.extract(mock_resp, "age", "json", '$.age', 0)
exchanger.extract(mock_resp, "data", "json", '$.data', 0)