File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
python/plugins/processing/tests Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 30
30
import nose2
31
31
import shutil
32
32
import os
33
+ import tempfile
33
34
34
35
from qgis .core import (QgsVectorLayer ,
35
36
QgsApplication ,
@@ -56,6 +57,9 @@ def setUpClass(cls):
56
57
Processing .initialize ()
57
58
cls .cleanup_paths = []
58
59
60
+ cls .temp_dir = tempfile .mkdtemp ()
61
+ cls .cleanup_paths .append (cls .temp_dir )
62
+
59
63
assert Grass7Utils .installedVersion ()
60
64
61
65
@classmethod
@@ -88,7 +92,8 @@ def testMemoryLayerInput(self):
88
92
89
93
alg = QgsApplication .processingRegistry ().createAlgorithmById ('grass7:v.buffer' )
90
94
self .assertIsNotNone (alg )
91
- temp_file = '/tmp/grass_output.shp'
95
+
96
+ temp_file = os .path .join (self .temp_dir ,'grass_output.shp' )
92
97
parameters = {'input' :'testmem' ,
93
98
'type' :[0 ,1 ,4 ],
94
99
'distance' :1 ,
@@ -138,7 +143,7 @@ def testFeatureSourceInput(self):
138
143
139
144
alg = QgsApplication .processingRegistry ().createAlgorithmById ('grass7:v.buffer' )
140
145
self .assertIsNotNone (alg )
141
- temp_file = '/tmp/grass_output .shp'
146
+ temp_file = os . path . join ( self . temp_dir , 'grass_output_sel .shp')
142
147
parameters = {'input' : QgsProcessingFeatureSourceDefinition ('testmem' , True ),
143
148
'type' : [0 , 1 , 4 ],
144
149
'distance' : 1 ,
You can’t perform that action at this time.
0 commit comments