|
@@ -12,13 +12,15 @@ from grass.gunittest.case import TestCase
|
|
|
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 @@ class TestRasterExtraction(TestCase):
|
|
|
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)
|