change: generate pytest in chain style by default

This commit is contained in:
debugtalk
2020-06-03 15:49:20 +08:00
parent 6b9bd46079
commit 59e99eeaa8
7 changed files with 86 additions and 163 deletions

View File

@@ -23,14 +23,9 @@ def main_run(extra_args):
# keep compatibility with v2
extra_args = ensure_cli_args(extra_args)
chain_style = False
tests_path_list = []
extra_args_new = []
for item in extra_args:
if item == "--chain-style":
chain_style = True
continue
if not os.path.exists(item):
# item is not file/folder path
extra_args_new.append(item)
@@ -43,7 +38,7 @@ def main_run(extra_args):
logger.error(f"No valid testcase path in cli arguments: {extra_args}")
sys.exit(1)
testcase_path_list = main_make(tests_path_list, chain_style=chain_style)
testcase_path_list = main_make(tests_path_list)
if not testcase_path_list:
logger.error("No valid testcases found, exit 1.")
sys.exit(1)
@@ -115,7 +110,7 @@ def main():
elif sys.argv[1] == "har2case":
main_har2case(args)
elif sys.argv[1] == "make":
main_make(args.testcase_path, chain_style=args.chain_style)
main_make(args.testcase_path)
def main_hrun_alias():