Skip to content

Commit 0e690fc

Browse files
committed
[processing tests] Fix test generation parameter types
1 parent 01c2cfb commit 0e690fc

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

python/plugins/processing/gui/TestTools.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,17 @@ def createTest(text):
153153

154154
params[param.name] = p
155155
else:
156-
params[param.name] = token
156+
try:
157+
params[param.name] = int(token)
158+
except ValueError:
159+
try:
160+
params[param.name] = float(token)
161+
except ValueError:
162+
if token[0] == '"':
163+
token = token[1:]
164+
if token[-1] == '"':
165+
token = token[:-1]
166+
params[param.name] = token
157167

158168
definition['params'] = params
159169

0 commit comments

Comments
 (0)