bugfix: debug entrance

This commit is contained in:
debugtalk
2018-02-23 20:22:24 +08:00
parent 4fc0641fc6
commit 0b4d8fe6fb
3 changed files with 13 additions and 12 deletions

View File

@@ -12,12 +12,12 @@ Then install all dependencies:
$ pip install -r requirements-dev.txt
```
Now you can use `httprunner/cli.py` as debugging entrances.
Now you can use `main-debug.py` as debugging entrances.
```bash
# debug hrun
$ python httprunner/cli.py hrun -h
$ python main-debug.py hrun -h
# debug locusts
$ python httprunner/cli.py locusts -h
$ python main-debug.py locusts -h
```

View File

@@ -143,12 +143,3 @@ def main_locust():
locusts.run_locusts_on_cpu_cores(sys.argv, cpu_cores_num_value)
else:
locusts.main()
if __name__ == '__main__':
cmd = sys.argv.pop(1)
if cmd in ["hrun", "httprunner", "ate"]:
main_hrun()
elif cmd in ["locust", "locusts"]:
main_locust()

10
main-debug.py Normal file
View File

@@ -0,0 +1,10 @@
import sys
from httprunner.cli import main_hrun, main_locust
cmd = sys.argv.pop(1)
if cmd in ["hrun", "httprunner", "ate"]:
main_hrun()
elif cmd in ["locust", "locusts"]:
main_locust()