From 48d45fbd2244df063703d0164875dc2eebd11d5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9d=C3=A9ric=20Ribreux?= Date: Fri, 6 May 2016 15:05:49 +0200 Subject: [PATCH] Fix multiple input parameter type detection for graphical unit test generator --- python/plugins/processing/gui/TestTools.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/python/plugins/processing/gui/TestTools.py b/python/plugins/processing/gui/TestTools.py index eb0a0c3303c..8e863d09d70 100644 --- a/python/plugins/processing/gui/TestTools.py +++ b/python/plugins/processing/gui/TestTools.py @@ -139,10 +139,18 @@ def createTest(text): elif isinstance(param, ParameterMultipleInput): multiparams = token[1:-1].split(';') newparam = [] + + # Handle datatype detection + dataType = param.dataType() + if dataType in ['points', 'lines', 'polygons', 'any vectors']: + dataType = 'vector' + else: + dataType = 'raster' + for mp in multiparams: schema, filepath = extractSchemaPath(mp) newparam.append({ - 'type': 'vector', + 'type': dataType, 'name': filepath }) p = {