Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Expand external file support to graphical unit test generator
- Loading branch information
Showing
with
13 additions
and
1 deletion.
-
+13
−1
python/plugins/processing/gui/TestTools.py
|
@@ -47,7 +47,8 @@ |
|
|
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: |
|
|