save testcase file path in testset config

This commit is contained in:
debugtalk
2017-08-30 16:54:55 +08:00
parent bf117b671c
commit c16120e2aa
2 changed files with 8 additions and 2 deletions

View File

@@ -102,7 +102,9 @@ def load_testcases_by_path(path):
elif os.path.isfile(path):
testset = {
"name": "",
"config": {},
"config": {
"path": path
},
"testcases": []
}
testcases_list = load_testcases(path)
@@ -110,7 +112,7 @@ def load_testcases_by_path(path):
for item in testcases_list:
for key in item:
if key == "config":
testset["config"] = item["config"]
testset["config"].update(item["config"])
testset["name"] = item["config"].get("name", "")
elif key == "test":
testset["testcases"].append(item["test"])