From c73a708307fe21b5a89d1e43fabde45cdbb33833 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Tue, 22 Jan 2019 21:19:03 +0800 Subject: [PATCH] print Invalid testcase path or testcases --- httprunner/api.py | 2 +- httprunner/utils.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/httprunner/api.py b/httprunner/api.py index d0190388..43292e00 100644 --- a/httprunner/api.py +++ b/httprunner/api.py @@ -233,7 +233,7 @@ class HttpRunner(object): elif validator.is_testcases(path_or_tests): return self.run_tests(path_or_tests) else: - raise exceptions.ParamsError("invalid testcase path or testcases.") + raise exceptions.ParamsError("Invalid testcase path or testcases: {}".format(path_or_tests)) @property def summary(self): diff --git a/httprunner/utils.py b/httprunner/utils.py index 109cdb0b..e9ba70f3 100644 --- a/httprunner/utils.py +++ b/httprunner/utils.py @@ -512,7 +512,8 @@ def print_io(in_out): content += prepare_content("Out", _out) content += "-" * 56 + "\n" - logger.log_info(content) + if _out: + logger.log_info(content) def create_scaffold(project_name):