Skip to content

Commit

Permalink
[processing] TestGenerator: Create parameters as dict
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Feb 23, 2016
1 parent 450fb13 commit 9111968
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions python/plugins/processing/gui/TestTools.py
Expand Up @@ -102,7 +102,7 @@ def createTest(text):
definition['name'] = 'Test ({})'.format(cmdname)
definition['algorithm'] = cmdname

params = []
params = {}
results = {}

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

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

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

params.append(p)
params[param.name] = p
else:
params.append(token)
params[param.name] = token

definition['params'] = params

Expand Down

0 comments on commit 9111968

Please sign in to comment.