Expand external file support to graphical unit test generator

This commit is contained in:
Médéric Ribreux 2016-05-06 14:44:04 +02:00 committed by Médéric RIBREUX
parent 1f21af6672
commit 222935b45f

View File

@ -47,7 +47,8 @@ from processing.core.outputs import (
from processing.core.parameters import (
ParameterRaster,
ParameterVector,
ParameterMultipleInput
ParameterMultipleInput,
ParameterFile
)
@ -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: