fix #112: RecursionError when running locust

This commit is contained in:
httprunner
2018-09-06 08:51:47 +08:00
parent ff02c5a9cb
commit 5cfb1146a2
3 changed files with 8 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
__title__ = 'HttpRunner' __title__ = 'HttpRunner'
__description__ = 'One-stop solution for HTTP(S) testing.' __description__ = 'One-stop solution for HTTP(S) testing.'
__url__ = 'https://github.com/HttpRunner/HttpRunner' __url__ = 'https://github.com/HttpRunner/HttpRunner'
__version__ = '1.5.13' __version__ = '1.5.14'
__author__ = 'debugtalk' __author__ = 'debugtalk'
__author_email__ = 'mail@debugtalk.com' __author_email__ = 'mail@debugtalk.com'
__license__ = 'MIT' __license__ = 'MIT'

View File

@@ -1,3 +1,9 @@
# encoding: utf-8 # encoding: utf-8
try:
# monkey patch at beginning to avoid RecursionError when running locust.
from gevent import monkey; monkey.patch_all()
except ImportError:
pass
from httprunner.api import HttpRunner, LocustRunner from httprunner.api import HttpRunner, LocustRunner

View File

@@ -1,7 +1,7 @@
- config: - config:
name: basic test with httpbin name: basic test with httpbin
request: request:
base_url: http://httpbin.org/ base_url: https://httpbin.org/
- test: - test:
name: index name: index
@@ -98,6 +98,3 @@
- len_eq: ["content", 9] - len_eq: ["content", 9]
- len_eq: ["json", 9] - len_eq: ["json", 9]
- len_eq: ["text", 9] - len_eq: ["text", 9]