mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-26 19:00:05 +08:00
change: remove cli --validate
This commit is contained in:
@@ -52,9 +52,6 @@ def main():
|
||||
parser.add_argument(
|
||||
'--startproject',
|
||||
help="Specify new project name.")
|
||||
parser.add_argument(
|
||||
'--validate', nargs='*',
|
||||
help="Validate YAML/JSON api/testcase/testsuite format.")
|
||||
parser.add_argument(
|
||||
'--prettify', nargs='*',
|
||||
help="Prettify JSON testcase format.")
|
||||
@@ -70,18 +67,6 @@ def main():
|
||||
print(f"{__version__}")
|
||||
sys.exit(0)
|
||||
|
||||
if args.validate:
|
||||
for validate_path in args.validate:
|
||||
try:
|
||||
logger.info(f"validate test file: {validate_path}")
|
||||
load_cases(validate_path, args.dot_env_path)
|
||||
except exceptions.MyBaseError as ex:
|
||||
logger.error(str(ex))
|
||||
continue
|
||||
|
||||
logger.info("done!")
|
||||
sys.exit(0)
|
||||
|
||||
if args.prettify:
|
||||
prettify_json_file(args.prettify)
|
||||
sys.exit(0)
|
||||
|
||||
Reference in New Issue
Block a user