[GRASS-SVN] r67888 - grass/trunk/temporal/t.connect/testsuite
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Feb 19 05:03:13 PST 2016
Author: lucadelu
Date: 2016-02-19 05:03:13 -0800 (Fri, 19 Feb 2016)
New Revision: 67888
Modified:
grass/trunk/temporal/t.connect/testsuite/test_distr_tgis_db_raster.py
grass/trunk/temporal/t.connect/testsuite/test_distr_tgis_db_raster3d.py
grass/trunk/temporal/t.connect/testsuite/test_distr_tgis_db_vector.py
Log:
t.connect: fixed testsuite, return to the right mapset
Modified: grass/trunk/temporal/t.connect/testsuite/test_distr_tgis_db_raster.py
===================================================================
--- grass/trunk/temporal/t.connect/testsuite/test_distr_tgis_db_raster.py 2016-02-19 10:24:25 UTC (rev 67887)
+++ grass/trunk/temporal/t.connect/testsuite/test_distr_tgis_db_raster.py 2016-02-19 13:03:13 UTC (rev 67888)
@@ -12,13 +12,15 @@
from grass.gunittest.gmodules import SimpleModule
from grass.gunittest.utils import silent_rmtree
import os
-import grass.temporal as tgis
class TestRasterExtraction(TestCase):
mapsets_to_remove = []
outfile = 'rastlist.txt'
+ gisenv = SimpleModule('g.gisenv', get='MAPSET')
+ TestCase.runModule(gisenv, expecting_stdout=True)
+ old_mapset = gisenv.outputs.stdout.strip()
@classmethod
def setUpClass(cls):
@@ -54,6 +56,7 @@
gisenv = SimpleModule('g.gisenv', get='LOCATION_NAME')
cls.runModule(gisenv, expecting_stdout=True)
location = gisenv.outputs.stdout.strip()
+ cls.runModule("g.mapset", mapset=cls.old_mapset)
for mapset_name in cls.mapsets_to_remove:
mapset_path = os.path.join(gisdbase, location, mapset_name)
silent_rmtree(mapset_path)
Modified: grass/trunk/temporal/t.connect/testsuite/test_distr_tgis_db_raster3d.py
===================================================================
--- grass/trunk/temporal/t.connect/testsuite/test_distr_tgis_db_raster3d.py 2016-02-19 10:24:25 UTC (rev 67887)
+++ grass/trunk/temporal/t.connect/testsuite/test_distr_tgis_db_raster3d.py 2016-02-19 13:03:13 UTC (rev 67888)
@@ -18,6 +18,9 @@
mapsets_to_remove = []
outfile = 'rast3dlist.txt'
+ gisenv = SimpleModule('g.gisenv', get='MAPSET')
+ TestCase.runModule(gisenv, expecting_stdout=True)
+ old_mapset = gisenv.outputs.stdout.strip()
@classmethod
def setUpClass(cls):
@@ -55,6 +58,7 @@
gisenv = SimpleModule('g.gisenv', get='LOCATION_NAME')
cls.runModule(gisenv, expecting_stdout=True)
location = gisenv.outputs.stdout.strip()
+ cls.runModule("g.mapset", mapset=cls.old_mapset)
for mapset_name in cls.mapsets_to_remove:
mapset_path = os.path.join(gisdbase, location, mapset_name)
silent_rmtree(mapset_path)
Modified: grass/trunk/temporal/t.connect/testsuite/test_distr_tgis_db_vector.py
===================================================================
--- grass/trunk/temporal/t.connect/testsuite/test_distr_tgis_db_vector.py 2016-02-19 10:24:25 UTC (rev 67887)
+++ grass/trunk/temporal/t.connect/testsuite/test_distr_tgis_db_vector.py 2016-02-19 13:03:13 UTC (rev 67888)
@@ -18,6 +18,9 @@
mapsets_to_remove = []
outfile = 'vectlist.txt'
+ gisenv = SimpleModule('g.gisenv', get='MAPSET')
+ TestCase.runModule(gisenv, expecting_stdout=True)
+ old_mapset = gisenv.outputs.stdout.strip()
@classmethod
def setUpClass(cls):
@@ -54,6 +57,7 @@
gisenv = SimpleModule('g.gisenv', get='LOCATION_NAME')
cls.runModule(gisenv, expecting_stdout=True)
location = gisenv.outputs.stdout.strip()
+ cls.runModule("g.mapset", mapset=cls.old_mapset)
for mapset_name in cls.mapsets_to_remove:
mapset_path = os.path.join(gisdbase, location, mapset_name)
silent_rmtree(mapset_path)
More information about the grass-commit
mailing list