From d58d45a1963eff9b0fc1635b2133c7b9e5e931d3 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Sun, 21 Jun 2020 11:54:14 +0800 Subject: [PATCH] fix: check config type --- httprunner/make.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/httprunner/make.py b/httprunner/make.py index b7a908d2..ec07bed2 100644 --- a/httprunner/make.py +++ b/httprunner/make.py @@ -511,6 +511,11 @@ def __make(tests_path: Text) -> NoReturn: f"Invalid testcase/testsuite: missing config part in testcase/testsuite.\npath: {test_file}" ) continue + elif not isinstance(test_content["config"], Dict): + logger.warning( + f"Invalid testcase/testsuite: config should be dict type, got {test_content['config']}" + ) + continue # ensure path absolute test_content.setdefault("config", {})["path"] = test_file