Преглед изворни кода

libpython/gunittest use DEFAULT_WIND from PERMANENT when creating a new mapset

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@74473 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz пре 6 година
родитељ
комит
ec4f7edd7c
1 измењених фајлова са 4 додато и 3 уклоњено
  1. 4 3
      lib/python/gunittest/invoker.py

+ 4 - 3
lib/python/gunittest/invoker.py

@@ -105,6 +105,7 @@ class GrassTestFilesInvoker(object):
 
         :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 @@ class GrassTestFilesInvoker(object):
             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):