mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-15 04:19:28 +08:00
change: generate pytest in chain style by default
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user