From 12a7f4bbd14933157b67466e3994092b72f4a2c4 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Thu, 23 Apr 2020 21:52:14 +0800 Subject: [PATCH] feat: command alias, hrun = httprunner run --- httprunner/cli.py | 8 ++++++++ pyproject.toml | 3 +-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/httprunner/cli.py b/httprunner/cli.py index 4aac1b87..6829a57e 100644 --- a/httprunner/cli.py +++ b/httprunner/cli.py @@ -151,5 +151,13 @@ def main(): main_locusts(args, extra_args) +def main_hrun_alias(): + """ command alias + hrun = httprunner run + """ + sys.argv.insert(1, "run") + main() + + if __name__ == '__main__': main() diff --git a/pyproject.toml b/pyproject.toml index 3de0634c..4755a224 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,8 +45,7 @@ uvicorn = "^0.11.3" fastapi = "^0.49.0" [tool.poetry.scripts] -hrun = "httprunner.cli:main" -ate = "httprunner.cli:main" +hrun = "httprunner.cli:main_hrun_alias" httprunner = "httprunner.cli:main" [build-system]