load_testcases_by_path: ignore file path that is not JSON or YAML

This commit is contained in:
debugtalk
2017-06-27 18:30:09 +08:00
parent 2531cc3920
commit 545911b679
+4 -1
View File
@@ -173,7 +173,10 @@ def load_testcases_by_path(path):
"config": {}, "config": {},
"testcases": [] "testcases": []
} }
testcases_list = load_testcases(path) try:
testcases_list = load_testcases(path)
except ParamsError:
return []
for item in testcases_list: for item in testcases_list:
for key in item: for key in item: