From 459f5abc6bd799e8396f90271c76039c21dbe489 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Tue, 29 Aug 2017 18:10:55 +0800 Subject: [PATCH] bugfix: numeric types should include long and complex --- ate/testcase.py | 4 ++-- ate/utils.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ate/testcase.py b/ate/testcase.py index 9b5f5146..b1e36921 100644 --- a/ate/testcase.py +++ b/ate/testcase.py @@ -1,7 +1,7 @@ import ast import re -from ate import utils +from ate.utils import long_type from ate.exception import ParamsError variable_regexp = r"\$([\w_]+)" @@ -222,7 +222,7 @@ class TestcaseParser(object): return evaluated_data - if isinstance(content, (int, float)): + if isinstance(content, (int, long_type, float, complex)): return content # content is in string format here diff --git a/ate/utils.py b/ate/utils.py index be9efa7b..c3521d10 100644 --- a/ate/utils.py +++ b/ate/utils.py @@ -13,9 +13,11 @@ from requests.structures import CaseInsensitiveDict try: string_type = basestring + long_type = long PYTHON_VERSION = 2 except NameError: string_type = str + long_type = int PYTHON_VERSION = 3 SECRET_KEY = "DebugTalk"