Skip to content

Commit 9111968

Browse files
committed
[processing] TestGenerator: Create parameters as dict
1 parent 450fb13 commit 9111968

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

python/plugins/processing/gui/TestTools.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def createTest(text):
102102
definition['name'] = 'Test ({})'.format(cmdname)
103103
definition['algorithm'] = cmdname
104104

105-
params = []
105+
params = {}
106106
results = {}
107107

108108
i = 0
@@ -123,7 +123,7 @@ def createTest(text):
123123
if not schema:
124124
p['location'] = '[The source data is not in the testdata directory. Please use data in the processing/tests/testdata folder.]'
125125

126-
params.append(p)
126+
params[param.name] = p
127127
elif isinstance(param, ParameterRaster):
128128
filename = token[1:-1]
129129
schema, filepath = extractSchemaPath(filename)
@@ -134,7 +134,7 @@ def createTest(text):
134134
if not schema:
135135
p['location'] = '[The source data is not in the testdata directory. Please use data in the processing/tests/testdata folder.]'
136136

137-
params.append(p)
137+
params[param.name] = p
138138
elif isinstance(param, ParameterMultipleInput):
139139
multiparams = token[1:-1].split(';')
140140
newparam = []
@@ -151,9 +151,9 @@ def createTest(text):
151151
if not schema:
152152
p['location'] = '[The source data is not in the testdata directory. Please use data in the processing/tests/testdata folder.]'
153153

154-
params.append(p)
154+
params[param.name] = p
155155
else:
156-
params.append(token)
156+
params[param.name] = token
157157

158158
definition['params'] = params
159159

0 commit comments

Comments
 (0)