|
@@ -8,7 +8,8 @@ import pytest
|
|
|
from common.parameterize import ddt, read_testcase
|
|
|
from common.request_util import RequestUtil
|
|
|
|
|
|
-# path = Path(__file__).parent.glob("**/*.yaml")
|
|
|
+path = Path(__file__).parent.glob("**/*.yaml")
|
|
|
+
|
|
|
|
|
|
def creat_case(yaml_path):
|
|
|
@pytest.mark.parametrize("arg_names", read_testcase(rf"{yaml_path}"))
|
|
@@ -31,11 +32,10 @@ class TestAPI:
|
|
|
|
|
|
|
|
|
|
|
|
-data = [Path(r"D:\TestPythonProject\TEST\test_case\qccq\个人中心\test_002_个人中心-我的收藏.yaml")]
|
|
|
-# for yaml_path in path:
|
|
|
-# data.append(yaml_path)
|
|
|
-# data.sort()
|
|
|
+data = []
|
|
|
+for yaml_path in path:
|
|
|
+ data.append(yaml_path)
|
|
|
+data.sort()
|
|
|
for yaml_path in data:
|
|
|
yaml_name = yaml_path.name[:-5]
|
|
|
- setattr(TestAPI, yaml_name, creat_case(yaml_path))
|
|
|
-
|
|
|
+ setattr(TestAPI, yaml_name, creat_case(yaml_path))
|