mirror of
https://github.com/httprunner/httprunner.git
synced 2026-08-28 11:36:56 +08:00
fix #1217: reload debugtalk.py if loaded
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
# Release History
|
# Release History
|
||||||
|
|
||||||
|
## 2.5.9 (2022-04-30)
|
||||||
|
|
||||||
|
- fix #1217: reload debugtalk.py if loaded
|
||||||
|
|
||||||
## 2.5.8 (2022-03-23)
|
## 2.5.8 (2022-03-23)
|
||||||
|
|
||||||
- change: replace events reporter from sentry to Google Analytics
|
- change: replace events reporter from sentry to Google Analytics
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import importlib
|
import importlib
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
from httprunner import exceptions, logger, utils
|
from httprunner import exceptions, logger, utils
|
||||||
from httprunner.loader.check import JsonSchemaChecker
|
from httprunner.loader.check import JsonSchemaChecker
|
||||||
@@ -26,7 +27,11 @@ def load_debugtalk_functions():
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
# load debugtalk.py module
|
# load debugtalk.py module
|
||||||
imported_module = importlib.import_module("debugtalk")
|
if sys.modules.get('debugtalk'):
|
||||||
|
imported_module = importlib.reload(sys.modules['debugtalk'])
|
||||||
|
else:
|
||||||
|
imported_module = importlib.import_module("debugtalk")
|
||||||
|
|
||||||
return load_module_functions(imported_module)
|
return load_module_functions(imported_module)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user