diff --git a/python/plugins/processing/gui/TestTools.py b/python/plugins/processing/gui/TestTools.py index 4bdacd90329..eb0a0c3303c 100644 --- a/python/plugins/processing/gui/TestTools.py +++ b/python/plugins/processing/gui/TestTools.py @@ -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: