mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 23:51:25 +08:00
add setup_hook_prepare_kwargs as default setup hook
This commit is contained in:
@@ -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.2.1-beta'
|
__version__ = '1.2.2-beta'
|
||||||
__author__ = 'debugtalk'
|
__author__ = 'debugtalk'
|
||||||
__author_email__ = 'mail@debugtalk.com'
|
__author_email__ = 'mail@debugtalk.com'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ def setup_logger(log_level):
|
|||||||
sys.tracebacklimit = 0
|
sys.tracebacklimit = 0
|
||||||
|
|
||||||
formatter = ColoredFormatter(
|
formatter = ColoredFormatter(
|
||||||
"%(log_color)s%(bg_white)s%(levelname)-8s%(reset)s %(message)s",
|
u"%(log_color)s%(bg_white)s%(levelname)-8s%(reset)s %(message)s",
|
||||||
datefmt=None,
|
datefmt=None,
|
||||||
reset=True,
|
reset=True,
|
||||||
log_colors=log_colors_config
|
log_colors=log_colors_config
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ class Runner(object):
|
|||||||
* *url*: URL that was called (or override name if it was used in the call to the client)
|
* *url*: URL that was called (or override name if it was used in the call to the client)
|
||||||
* *kwargs*: kwargs of request
|
* *kwargs*: kwargs of request
|
||||||
"""
|
"""
|
||||||
|
hooks.insert(0, "setup_hook_prepare_kwargs")
|
||||||
event = self._prepare_hooks_event(hooks)
|
event = self._prepare_hooks_event(hooks)
|
||||||
if not event:
|
if not event:
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user