mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-12 16:01:27 +08:00
bugfix: numeric types should include long and complex
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import ast
|
import ast
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from ate import utils
|
from ate.utils import long_type
|
||||||
from ate.exception import ParamsError
|
from ate.exception import ParamsError
|
||||||
|
|
||||||
variable_regexp = r"\$([\w_]+)"
|
variable_regexp = r"\$([\w_]+)"
|
||||||
@@ -222,7 +222,7 @@ class TestcaseParser(object):
|
|||||||
|
|
||||||
return evaluated_data
|
return evaluated_data
|
||||||
|
|
||||||
if isinstance(content, (int, float)):
|
if isinstance(content, (int, long_type, float, complex)):
|
||||||
return content
|
return content
|
||||||
|
|
||||||
# content is in string format here
|
# content is in string format here
|
||||||
|
|||||||
@@ -13,9 +13,11 @@ from requests.structures import CaseInsensitiveDict
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
string_type = basestring
|
string_type = basestring
|
||||||
|
long_type = long
|
||||||
PYTHON_VERSION = 2
|
PYTHON_VERSION = 2
|
||||||
except NameError:
|
except NameError:
|
||||||
string_type = str
|
string_type = str
|
||||||
|
long_type = int
|
||||||
PYTHON_VERSION = 3
|
PYTHON_VERSION = 3
|
||||||
|
|
||||||
SECRET_KEY = "DebugTalk"
|
SECRET_KEY = "DebugTalk"
|
||||||
|
|||||||
Reference in New Issue
Block a user