[GRASS-SVN] r74473 - grass/trunk/lib/python/gunittest
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue May 7 13:00:52 PDT 2019
Author: mmetz
Date: 2019-05-07 13:00:52 -0700 (Tue, 07 May 2019)
New Revision: 74473
Modified:
grass/trunk/lib/python/gunittest/invoker.py
Log:
libpython/gunittest use DEFAULT_WIND from PERMANENT when creating a new mapset
Modified: grass/trunk/lib/python/gunittest/invoker.py
===================================================================
--- grass/trunk/lib/python/gunittest/invoker.py 2019-05-07 19:55:59 UTC (rev 74472)
+++ grass/trunk/lib/python/gunittest/invoker.py 2019-05-07 20:00:52 UTC (rev 74473)
@@ -105,6 +105,7 @@
:param loader.GrassTestPythonModule module:
"""
+ # TODO: use g.mapset -c, no need to duplicate functionality
# using path.sep but also / and \ for cases when it is confused
# (namely the case of Unix path on MS Windows)
# replace . to get rid of unclean path
@@ -118,11 +119,11 @@
silent_rmtree(mapset_dir)
os.mkdir(mapset_dir)
# TODO: default region in mapset will be what?
- # copy WIND file from PERMANENT
+ # copy DEFAULT_WIND file from PERMANENT to WIND
# TODO: this should be a function in grass.script (used also in gis_set.py, PyGRASS also has its way with Mapset)
# TODO: are premisions an issue here?
- shutil.copy(os.path.join(gisdbase, location, 'PERMANENT', 'WIND'),
- os.path.join(mapset_dir))
+ shutil.copy(os.path.join(gisdbase, location, 'PERMANENT', 'DEFAULT_WIND'),
+ os.path.join(mapset_dir, 'WIND'))
return mapset, mapset_dir
def _run_test_module(self, module, results_dir, gisdbase, location):
More information about the grass-commit
mailing list