From b10fa5e9798b86fb4d319a190e394927483816da Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Wed, 25 Jul 2018 18:51:16 +1000 Subject: [PATCH] [processing][grass] Fix v.vect.stats output type, add test --- .../algs/grass7/ext/v_vect_stats.py | 2 +- .../testdata/expected/grass7/v_vect_stats.dbf | Bin 0 -> 756 bytes .../testdata/expected/grass7/v_vect_stats.prj | 1 + .../testdata/expected/grass7/v_vect_stats.shp | Bin 0 -> 484 bytes .../testdata/expected/grass7/v_vect_stats.shx | Bin 0 -> 116 bytes .../grass7_algorithms_vector_tests.yaml | 25 ++++++++++++++++++ 6 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 python/plugins/processing/tests/testdata/expected/grass7/v_vect_stats.dbf create mode 100644 python/plugins/processing/tests/testdata/expected/grass7/v_vect_stats.prj create mode 100644 python/plugins/processing/tests/testdata/expected/grass7/v_vect_stats.shp create mode 100644 python/plugins/processing/tests/testdata/expected/grass7/v_vect_stats.shx diff --git a/python/plugins/processing/algs/grass7/ext/v_vect_stats.py b/python/plugins/processing/algs/grass7/ext/v_vect_stats.py index 788b4234d60..f0f38c52c11 100644 --- a/python/plugins/processing/algs/grass7/ext/v_vect_stats.py +++ b/python/plugins/processing/algs/grass7/ext/v_vect_stats.py @@ -36,4 +36,4 @@ def processOutputs(alg, parameters, context, feedback): fileName = alg.parameterAsOutputLayer(parameters, 'output', context) grassName = alg.exportedLayers['areas'] dataType = 'auto' - alg.exportVectorLayer(grassName, fileName, dataType) + alg.exportVectorLayer(grassName, fileName, dataType=dataType) diff --git a/python/plugins/processing/tests/testdata/expected/grass7/v_vect_stats.dbf b/python/plugins/processing/tests/testdata/expected/grass7/v_vect_stats.dbf new file mode 100644 index 0000000000000000000000000000000000000000..81586dfe537ff3183ce35f3db0d13b7355ff3010 GIT binary patch literal 756 zcmZQBW0z!NU|?9tpvefNP(e5YLvmsXOw13&;Dqs@bXsN#OvD+)_y^-b>E!&G^r_xrxQudIm7zkwzOsJ#3(7fC}INVT2M;hH&u_ L#(;SoBcP-Jki%Y| literal 0 HcmV?d00001 diff --git a/python/plugins/processing/tests/testdata/expected/grass7/v_vect_stats.prj b/python/plugins/processing/tests/testdata/expected/grass7/v_vect_stats.prj new file mode 100644 index 00000000000..a30c00a55de --- /dev/null +++ b/python/plugins/processing/tests/testdata/expected/grass7/v_vect_stats.prj @@ -0,0 +1 @@ +GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] \ No newline at end of file diff --git a/python/plugins/processing/tests/testdata/expected/grass7/v_vect_stats.shp b/python/plugins/processing/tests/testdata/expected/grass7/v_vect_stats.shp new file mode 100644 index 0000000000000000000000000000000000000000..1566b4c1d91cc732dff6f85d14db2fc033caa6dd GIT binary patch literal 484 zcmZQzQ0HR64nDnLW?*0i$}JDFNeWwI|g?&g49 zJBlbHke7gLR=(A@BeGB39E>yW$2{1GFbkxR6RK6{Y2mqLKzljOpDCI?b90dVySD7v zI)vJ-|JUs8-C*Qkxp0BdAD}$UEc4kDHFALbua=?Tj{(irGZ5x~4YW(sYsx8s^+pc8 zfxFAKfP9vDvr>508adqbRIyP5@?rjjxeeWZptG2OI0EF4hUTMu;y|~chsmjW*SpR@ zvq1jf0Adhetd=dm2y~}N(fsY}pCH@?Qws}Ej~$zS^aJJZY~0GL1PtGat9UN|28OqH nZh4?BP(RGB!ky37n*i;OdH8Y8WuQFFEt7ObPB;VgquU1nU{R;~ literal 0 HcmV?d00001 diff --git a/python/plugins/processing/tests/testdata/expected/grass7/v_vect_stats.shx b/python/plugins/processing/tests/testdata/expected/grass7/v_vect_stats.shx new file mode 100644 index 0000000000000000000000000000000000000000..63aed4072ca1df9b23b4a2288e263897656dfeee GIT binary patch literal 116 zcmZQzQ0HR64y;}