change cli: run_path

This commit is contained in:
debugtalk
2020-04-21 23:08:26 +08:00
parent 97a0be3730
commit b98d95c69b
2 changed files with 2 additions and 2 deletions

View File

@@ -73,7 +73,7 @@ def main_run(args):
err_code = 0
try:
for path in args.testfile_paths:
summary = runner.run(path, dot_env_path=args.dot_env_path)
summary = runner.run_path(path, dot_env_path=args.dot_env_path)
report_dir = args.report_dir or os.path.join(os.getcwd(), "reports")
gen_html_report(
summary,

View File

@@ -223,6 +223,7 @@ class HttpRunner(object):
"""
# load tests
logger.info(f"HttpRunner version: {__version__}")
self.exception_stage = "load tests"
tests_mapping = loader.load_cases(path, dot_env_path)
@@ -245,7 +246,6 @@ class HttpRunner(object):
dict: result summary
"""
logger.info(f"HttpRunner version: {__version__}")
if loader.is_test_path(path_or_tests):
return self.run_path(path_or_tests, dot_env_path, mapping)
elif loader.is_test_content(path_or_tests):