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 3030import nose2
3131import shutil
3232import os
33+ import tempfile
3334
3435from qgis .core import (QgsVectorLayer ,
3536 QgsApplication ,
@@ -56,6 +57,9 @@ def setUpClass(cls):
5657 Processing .initialize ()
5758 cls .cleanup_paths = []
5859
60+ cls .temp_dir = tempfile .mkdtemp ()
61+ cls .cleanup_paths .append (cls .temp_dir )
62+
5963 assert Grass7Utils .installedVersion ()
6064
6165 @classmethod
@@ -88,7 +92,8 @@ def testMemoryLayerInput(self):
8892
8993 alg = QgsApplication .processingRegistry ().createAlgorithmById ('grass7:v.buffer' )
9094 self .assertIsNotNone (alg )
91- temp_file = '/tmp/grass_output.shp'
95+
96+ temp_file = os .path .join (self .temp_dir ,'grass_output.shp' )
9297 parameters = {'input' :'testmem' ,
9398 'type' :[0 ,1 ,4 ],
9499 'distance' :1 ,
@@ -138,7 +143,7 @@ def testFeatureSourceInput(self):
138143
139144 alg = QgsApplication .processingRegistry ().createAlgorithmById ('grass7:v.buffer' )
140145 self .assertIsNotNone (alg )
141- temp_file = '/tmp/grass_output .shp'
146+ temp_file = os . path . join ( self . temp_dir , 'grass_output_sel .shp')
142147 parameters = {'input' : QgsProcessingFeatureSourceDefinition ('testmem' , True ),
143148 'type' : [0 , 1 , 4 ],
144149 'distance' : 1 ,
You can’t perform that action at this time.
0 commit comments