Skip to content

Commit

Permalink
Expand external file support to graphical unit test generator
Browse files Browse the repository at this point in the history
  • Loading branch information
Médéric Ribreux authored and Médéric RIBREUX committed May 29, 2016
1 parent 1f21af6 commit 222935b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion python/plugins/processing/gui/TestTools.py
Expand Up @@ -47,7 +47,8 @@
from processing.core.parameters import (
ParameterRaster,
ParameterVector,
ParameterMultipleInput
ParameterMultipleInput,
ParameterFile
)


Expand Down Expand Up @@ -151,6 +152,17 @@ 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[param.name] = p
elif isinstance(param, ParameterFile):
filename = token[1:-1]
schema, filepath = extractSchemaPath(filename)
p = {
'type': 'file',
'name': filepath
}
if not schema:
p['location'] = '[The source data is not in the testdata directory. Please use data in the processing/tests/testdata folder.]'

params[param.name] = p
else:
try:
Expand Down

0 comments on commit 222935b

Please sign in to comment.