mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-11 10:49:43 +08:00
fix: NameError, name 'locust_main' is not defined
This commit is contained in:
@@ -1,12 +1,16 @@
|
|||||||
# Release History
|
# Release History
|
||||||
|
|
||||||
## 3.1.2 (2020-06-28)
|
## 3.1.2 (2020-06-29)
|
||||||
|
|
||||||
**Fixed**
|
**Fixed**
|
||||||
|
|
||||||
- fix: missing setup/teardown hooks for referenced testcase
|
- fix: missing setup/teardown hooks for referenced testcase
|
||||||
- fix: compatibility for `black` on Android termux that does not support multiprocessing well
|
- fix: compatibility for `black` on Android termux that does not support multiprocessing well
|
||||||
|
|
||||||
|
**Changed**
|
||||||
|
|
||||||
|
- change: import locust at beginning to monkey patch all modules
|
||||||
|
|
||||||
## 3.1.1 (2020-06-23)
|
## 3.1.1 (2020-06-23)
|
||||||
|
|
||||||
**Added**
|
**Added**
|
||||||
|
|||||||
@@ -1,16 +1,12 @@
|
|||||||
import importlib.util
|
|
||||||
import inspect
|
|
||||||
import os
|
|
||||||
import sys
|
import sys
|
||||||
from typing import List
|
|
||||||
|
|
||||||
if sys.argv[0].endswith("locusts"):
|
if "locust" in sys.argv[0]:
|
||||||
try:
|
try:
|
||||||
# monkey patch ssl at beginning to avoid RecursionError when running locust.
|
# monkey patch all at beginning to avoid RecursionError when running locust.
|
||||||
from gevent import monkey
|
# `from gevent import monkey; monkey.patch_all()` will be triggered when importing locust
|
||||||
|
|
||||||
monkey.patch_ssl()
|
|
||||||
from locust import main as locust_main
|
from locust import main as locust_main
|
||||||
|
|
||||||
|
print("NOTICE: gevent monkey patches have been applied !!!")
|
||||||
except ImportError:
|
except ImportError:
|
||||||
msg = """
|
msg = """
|
||||||
Locust is not installed, install first and try again.
|
Locust is not installed, install first and try again.
|
||||||
@@ -20,9 +16,14 @@ $ pip install locust
|
|||||||
print(msg)
|
print(msg)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
import importlib.util
|
||||||
|
import inspect
|
||||||
|
import os
|
||||||
|
from typing import List
|
||||||
|
|
||||||
from loguru import logger
|
from loguru import logger
|
||||||
|
|
||||||
|
|
||||||
""" converted pytest files from YAML/JSON testcases
|
""" converted pytest files from YAML/JSON testcases
|
||||||
"""
|
"""
|
||||||
pytest_files: List = []
|
pytest_files: List = []
|
||||||
|
|||||||
Reference in New Issue
Block a user