[GRASS-SVN] r63652 - in grass/trunk: general/g.list/testsuite lib/python/pygrass/modules lib/python/pygrass/raster/testsuite lib/python/pygrass/vector/testsuite lib/python/script raster/r.category raster/r.gwflow/testsuite raster/r.in.poly/testsuite raster/r.mapcalc/testsuite raster/r.recode/testsuite raster/r.slope.aspect/testsuite raster3d/r3.flow/testsuite raster3d/r3.gradient/testsuite scripts/r3.in.xyz vector/v.what/testsuite

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Dec 20 09:17:19 PST 2014


Author: neteler
Date: 2014-12-20 09:17:19 -0800 (Sat, 20 Dec 2014)
New Revision: 63652

Modified:
   grass/trunk/general/g.list/testsuite/test_g_list.py
   grass/trunk/lib/python/pygrass/modules/shortcuts.py
   grass/trunk/lib/python/pygrass/raster/testsuite/test_raster.py
   grass/trunk/lib/python/pygrass/vector/testsuite/test_vector3d.py
   grass/trunk/lib/python/script/raster.py
   grass/trunk/raster/r.category/test_rcategory_doctest.txt
   grass/trunk/raster/r.gwflow/testsuite/validation_7x7_grid.py
   grass/trunk/raster/r.gwflow/testsuite/validation_excavation.py
   grass/trunk/raster/r.in.poly/testsuite/test_rinpoly.py
   grass/trunk/raster/r.mapcalc/testsuite/test_r3_mapcalc.py
   grass/trunk/raster/r.mapcalc/testsuite/test_r_mapcalc.py
   grass/trunk/raster/r.recode/testsuite/test_rrecode_ncspm.py
   grass/trunk/raster/r.slope.aspect/testsuite/test_r_slope_aspect.py
   grass/trunk/raster3d/r3.flow/testsuite/r3flow_test.py
   grass/trunk/raster3d/r3.gradient/testsuite/r3gradient_test.py
   grass/trunk/scripts/r3.in.xyz/r3.in.xyz.py
   grass/trunk/vector/v.what/testsuite/test_vwhat_layers.py
Log:
update g.list/g.remove calls to use new element names (#2409)

Modified: grass/trunk/general/g.list/testsuite/test_g_list.py
===================================================================
--- grass/trunk/general/g.list/testsuite/test_g_list.py	2014-12-20 17:03:16 UTC (rev 63651)
+++ grass/trunk/general/g.list/testsuite/test_g_list.py	2014-12-20 17:17:19 UTC (rev 63652)
@@ -20,7 +20,7 @@
 
     def test_pt_flags(self):
         """Test that -p and -t flags are exclusive"""
-        module = SimpleModule('g.list', flags='pt', type='rast')
+        module = SimpleModule('g.list', flags='pt', type='raster')
         self.assertModuleFail(module)
         stderr = module.outputs.stderr
         self.assertIn('-p', stderr)
@@ -28,7 +28,7 @@
 
     def test_ft_flags(self):
         """Test that -f and -t flags are exclusive"""
-        module = SimpleModule('g.list', flags='ft', type='rast')
+        module = SimpleModule('g.list', flags='ft', type='raster')
         self.assertModuleFail(module)
         stderr = module.outputs.stderr
         self.assertIn('-f', stderr)
@@ -36,7 +36,7 @@
 
     def test_pf_flags(self):
         """Test that -p and -f flags are exclusive"""
-        module = SimpleModule('g.list', flags='pf', type='rast')
+        module = SimpleModule('g.list', flags='pf', type='raster')
         self.assertModuleFail(module)
         stderr = module.outputs.stderr
         self.assertIn('-p', stderr)
@@ -44,7 +44,7 @@
 
     def test_re_flags(self):
         """Test that -r and -e flags are exclusive"""
-        module = SimpleModule('g.list', flags='re', type='rast')
+        module = SimpleModule('g.list', flags='re', type='raster')
         self.assertModuleFail(module)
         stderr = module.outputs.stderr
         self.assertIn('-r', stderr)

Modified: grass/trunk/lib/python/pygrass/modules/shortcuts.py
===================================================================
--- grass/trunk/lib/python/pygrass/modules/shortcuts.py	2014-12-20 17:03:16 UTC (rev 63651)
+++ grass/trunk/lib/python/pygrass/modules/shortcuts.py	2014-12-20 17:17:19 UTC (rev 63652)
@@ -20,7 +20,7 @@
        'g.list'
        >>> g_list.required
        ['type']
-       >>> g_list.inputs.type = 'rast'
+       >>> g_list.inputs.type = 'raster'
        >>> g_list.stdout_ = -1
        >>> g_list.run()
        Module('g.list')

Modified: grass/trunk/lib/python/pygrass/raster/testsuite/test_raster.py
===================================================================
--- grass/trunk/lib/python/pygrass/raster/testsuite/test_raster.py	2014-12-20 17:03:16 UTC (rev 63651)
+++ grass/trunk/lib/python/pygrass/raster/testsuite/test_raster.py	2014-12-20 17:17:19 UTC (rev 63652)
@@ -21,7 +21,7 @@
     def tearDownClass(cls):
         """Remove the generated vector map, if exist"""
         from grass.pygrass.modules.shortcuts import general as g
-        g.remove(type='rast', name=cls.tmp, flags='f')
+        g.remove(type='raster', name=cls.tmp, flags='f')
 
     def test_type(self):
         r = RasterRow(self.name)

Modified: grass/trunk/lib/python/pygrass/vector/testsuite/test_vector3d.py
===================================================================
--- grass/trunk/lib/python/pygrass/vector/testsuite/test_vector3d.py	2014-12-20 17:03:16 UTC (rev 63651)
+++ grass/trunk/lib/python/pygrass/vector/testsuite/test_vector3d.py	2014-12-20 17:17:19 UTC (rev 63652)
@@ -61,7 +61,7 @@
         """Remove the generated vector map, if exist"""
         mset = get_mapset_vector(cls.tmpname, mapset='')
         if mset:
-            run_command("g.remove", flags='f', type='vect', name=cls.tmpname)
+            run_command("g.remove", flags='f', type='vector', name=cls.tmpname)
 
 
 if __name__ == '__main__':

Modified: grass/trunk/lib/python/script/raster.py
===================================================================
--- grass/trunk/lib/python/script/raster.py	2014-12-20 17:03:16 UTC (rev 63651)
+++ grass/trunk/lib/python/script/raster.py	2014-12-20 17:17:19 UTC (rev 63652)
@@ -122,7 +122,7 @@
     0
     >>> p2.wait()
     1
-    >>> run_command('g.remove', flags='f', type='rast', name=output)
+    >>> run_command('g.remove', flags='f', type='raster', name=output)
 
     :param str exp: expression
     :param bool quiet: True to run quietly (<tt>--q</tt>)

Modified: grass/trunk/raster/r.category/test_rcategory_doctest.txt
===================================================================
--- grass/trunk/raster/r.category/test_rcategory_doctest.txt	2014-12-20 17:03:16 UTC (rev 63651)
+++ grass/trunk/raster/r.category/test_rcategory_doctest.txt	2014-12-20 17:17:19 UTC (rev 63652)
@@ -231,9 +231,9 @@
 when test finishes. It could test if everything which was expected
 to be created was created if it would check all outputs properly.
 
->>> run_command('g.remove', flags='f', type='rast', name='test')
+>>> run_command('g.remove', flags='f', type='raster', name='test')
 0
->>> run_command('g.remove', flags='f', type='rast', name='test_14')
+>>> run_command('g.remove', flags='f', type='raster', name='test_14')
 0
->>> run_command('g.remove', flags='f', type='rast', name='test_d')
+>>> run_command('g.remove', flags='f', type='raster', name='test_d')
 0

Modified: grass/trunk/raster/r.gwflow/testsuite/validation_7x7_grid.py
===================================================================
--- grass/trunk/raster/r.gwflow/testsuite/validation_7x7_grid.py	2014-12-20 17:03:16 UTC (rev 63651)
+++ grass/trunk/raster/r.gwflow/testsuite/validation_7x7_grid.py	2014-12-20 17:17:19 UTC (rev 63652)
@@ -40,13 +40,13 @@
         #First compute the groundwater flow after 500 seconds to have initial conditions
         self.assertModule("r.gwflow", flags="f", solver="cholesky", top="top_conf", bottom="bottom", phead="phead",\
          status="status", hc_x="hydcond", hc_y="hydcond", q="well", s="s",\
-         recharge="recharge", output="gwresult_conf", dt=500, type="confined", budget="water_budget",  overwrite=True)
+         recharge="recharge", output="gwresult_conf", dtime=500, type="confined", budget="water_budget",  overwrite=True)
 
         # loop over the timesteps each 500 seconds
         for i in range(20):
             self.assertModule("r.gwflow",  flags="f", solver="cholesky", top="top_conf", bottom="bottom", phead="gwresult_conf",\
              status="status", hc_x="hydcond", hc_y="hydcond", q="well", s="s",\
-             recharge="recharge", output="gwresult_conf", dt=500, type="confined", budget="water_budget",  overwrite=True)
+             recharge="recharge", output="gwresult_conf", dtime=500, type="confined", budget="water_budget",  overwrite=True)
 
         # Output of r.univar
         univar_string="""n=49

Modified: grass/trunk/raster/r.gwflow/testsuite/validation_excavation.py
===================================================================
--- grass/trunk/raster/r.gwflow/testsuite/validation_excavation.py	2014-12-20 17:03:16 UTC (rev 63651)
+++ grass/trunk/raster/r.gwflow/testsuite/validation_excavation.py	2014-12-20 17:17:19 UTC (rev 63652)
@@ -45,7 +45,7 @@
         #compute a steady state groundwater flow
         self.assertModule("r.gwflow", flags="f", solver="cholesky", top="top", bottom="bottom", phead="phead", \
             status="status", hc_x="hydcond", hc_y="hydcond", s="poros", \
-            recharge="recharge", output="gwresult", dt=864000000000, type="unconfined", budget="water_budget")
+            recharge="recharge", output="gwresult", dtime=864000000000, type="unconfined", budget="water_budget")
         
         # Output of r.univar -g
         univar_string="""n=760

Modified: grass/trunk/raster/r.in.poly/testsuite/test_rinpoly.py
===================================================================
--- grass/trunk/raster/r.in.poly/testsuite/test_rinpoly.py	2014-12-20 17:03:16 UTC (rev 63651)
+++ grass/trunk/raster/r.in.poly/testsuite/test_rinpoly.py	2014-12-20 17:17:19 UTC (rev 63652)
@@ -42,7 +42,7 @@
 
     def tearDown(self):
         """Remove rinpoly map after each test method"""
-        self.runModule('g.remove', flags='f', type='rast',
+        self.runModule('g.remove', flags='f', type='raster',
                        name=self.rinpoly)
         os.unlink(self.tmpFile.name)
 

Modified: grass/trunk/raster/r.mapcalc/testsuite/test_r3_mapcalc.py
===================================================================
--- grass/trunk/raster/r.mapcalc/testsuite/test_r3_mapcalc.py	2014-12-20 17:03:16 UTC (rev 63651)
+++ grass/trunk/raster/r.mapcalc/testsuite/test_r3_mapcalc.py	2014-12-20 17:17:19 UTC (rev 63652)
@@ -21,7 +21,7 @@
     def tearDownClass(cls):
         cls.del_temp_region()
         if cls.to_remove:
-            cls.runModule('g.remove', flags='f', type='rast3d',
+            cls.runModule('g.remove', flags='f', type='raster_3d',
                 name=','.join(cls.to_remove), verbose=True)
 
     def test_difference_of_the_same_map_double(self):

Modified: grass/trunk/raster/r.mapcalc/testsuite/test_r_mapcalc.py
===================================================================
--- grass/trunk/raster/r.mapcalc/testsuite/test_r_mapcalc.py	2014-12-20 17:03:16 UTC (rev 63651)
+++ grass/trunk/raster/r.mapcalc/testsuite/test_r_mapcalc.py	2014-12-20 17:17:19 UTC (rev 63652)
@@ -73,7 +73,7 @@
     def tearDownClass(cls):
         cls.del_temp_region()
         if cls.to_remove:
-            cls.runModule('g.remove', flags='f', type='rast',
+            cls.runModule('g.remove', flags='f', type='raster',
                 name=','.join(cls.to_remove))
 
     def rinfo_contains_number(self, raster, number):
@@ -178,7 +178,7 @@
     def tearDownClass(cls):
         cls.del_temp_region()
         if cls.to_remove:
-            cls.runModule('g.remove', flags='f', type='rast',
+            cls.runModule('g.remove', flags='f', type='raster',
                 name=','.join(cls.to_remove), verbose=True)
 
     def test_difference_of_the_same_map_double(self):

Modified: grass/trunk/raster/r.recode/testsuite/test_rrecode_ncspm.py
===================================================================
--- grass/trunk/raster/r.recode/testsuite/test_rrecode_ncspm.py	2014-12-20 17:03:16 UTC (rev 63651)
+++ grass/trunk/raster/r.recode/testsuite/test_rrecode_ncspm.py	2014-12-20 17:17:19 UTC (rev 63652)
@@ -45,7 +45,7 @@
     @classmethod
     def tearDownClass(cls):
         cls.del_temp_region()
-        cls.runModule('g.remove', type='rast', name=['random01', 'recoded'], flags='f')
+        cls.runModule('g.remove', type='raster', name=['random01', 'recoded'], flags='f')
 
     def test_formats_elevation(self):
         recode = SimpleModule('r.recode', input='elevation at PERMANENT', output='recoded',

Modified: grass/trunk/raster/r.slope.aspect/testsuite/test_r_slope_aspect.py
===================================================================
--- grass/trunk/raster/r.slope.aspect/testsuite/test_r_slope_aspect.py	2014-12-20 17:03:16 UTC (rev 63651)
+++ grass/trunk/raster/r.slope.aspect/testsuite/test_r_slope_aspect.py	2014-12-20 17:17:19 UTC (rev 63652)
@@ -68,7 +68,7 @@
     @classmethod
     def tearDownClass(cls):
         cls.del_temp_region()
-        cls.runModule('g.remove', flags='f', type='rast', name=cls.elevation)
+        cls.runModule('g.remove', flags='f', type='raster', name=cls.elevation)
 
     def test_slope(self):
         ref_slope = 'reference_slope'

Modified: grass/trunk/raster3d/r3.flow/testsuite/r3flow_test.py
===================================================================
--- grass/trunk/raster3d/r3.flow/testsuite/r3flow_test.py	2014-12-20 17:03:16 UTC (rev 63651)
+++ grass/trunk/raster3d/r3.flow/testsuite/r3flow_test.py	2014-12-20 17:17:19 UTC (rev 63652)
@@ -86,7 +86,7 @@
                           direction='down')
         self.runModule('v.out.ascii', input='test_flowline',
                        format='standard', output='./data/flowline_tmp.ascii',
-                       dp=6)
+                       precision=6)
         self.assertVectorAsciiEqualsVectorAscii(actual='./data/flowline_tmp.ascii',
                                                 reference='./data/flowline.ascii')
         self.assertRaster3dFitsUnivar('test_flowaccum', reference=flowaccum, precision=1e-6)

Modified: grass/trunk/raster3d/r3.gradient/testsuite/r3gradient_test.py
===================================================================
--- grass/trunk/raster3d/r3.gradient/testsuite/r3gradient_test.py	2014-12-20 17:03:16 UTC (rev 63651)
+++ grass/trunk/raster3d/r3.gradient/testsuite/r3gradient_test.py	2014-12-20 17:17:19 UTC (rev 63652)
@@ -137,7 +137,7 @@
 
     def test_gradient_block(self):
         self.runModule('g.region', res3=10, n=100, s=0, w=0, e=120, b=0, t=50)
-        self.assertModule('r3.gradient', input='test_map_1_ref', block_size=[200, 2, 50],
+        self.assertModule('r3.gradient', input='test_map_1_ref', blocksize=[200, 2, 50],
                           output=['test_grad_x', 'test_grad_y', 'test_grad_z'], overwrite=True)
         self.assertRaster3dFitsUnivar(raster='test_grad_x', reference=r3univar_test_grad_x, precision=1e-8)
         self.assertRaster3dFitsUnivar(raster='test_grad_y', reference=r3univar_test_grad_y, precision=1e-8)
@@ -145,7 +145,7 @@
 
     def test_gradient_nulls(self):
         self.runModule('g.region', res3=1, n=5, s=0, w=0, e=5, b=0, t=5)
-        self.assertModule('r3.gradient', input='test_map_2_ref', block_size=[200, 2, 50],
+        self.assertModule('r3.gradient', input='test_map_2_ref', blocksize=[200, 2, 50],
                           output=['test_null_grad_x', 'test_null_grad_y', 'test_null_grad_z'])
         self.assertRaster3dFitsUnivar(raster='test_null_grad_x',
                                       reference=r3univar_test_nulls_grad_x, precision=1e-8)

Modified: grass/trunk/scripts/r3.in.xyz/r3.in.xyz.py
===================================================================
--- grass/trunk/scripts/r3.in.xyz/r3.in.xyz.py	2014-12-20 17:03:16 UTC (rev 63651)
+++ grass/trunk/scripts/r3.in.xyz/r3.in.xyz.py	2014-12-20 17:17:19 UTC (rev 63652)
@@ -307,7 +307,7 @@
     grass.verbose(_("Assembling 3D cube ..."))
 
     #input order: lower most strata first
-    slices = grass.read_command('g.list', type='rast', sep=',',
+    slices = grass.read_command('g.list', type='raster', sep=',',
                                 pattern='tmp.r3xyz.%d.*' % os.getpid()).rstrip(os.linesep)
     grass.debug(slices)
 

Modified: grass/trunk/vector/v.what/testsuite/test_vwhat_layers.py
===================================================================
--- grass/trunk/vector/v.what/testsuite/test_vwhat_layers.py	2014-12-20 17:03:16 UTC (rev 63651)
+++ grass/trunk/vector/v.what/testsuite/test_vwhat_layers.py	2014-12-20 17:17:19 UTC (rev 63652)
@@ -119,14 +119,14 @@
         cls.runModule('v.in.ascii', input='./data/testing.ascii', output='test_vector',
                       format='standard')
         cls.runModule('db.connect', flags='c')
-        cls.runModule('db.in.ogr', dsn='./data/table1.csv', output='t1')
-        cls.runModule('db.in.ogr', dsn='./data/table2.csv', output='t2')
+        cls.runModule('db.in.ogr', input='./data/table1.csv', output='t1')
+        cls.runModule('db.in.ogr', input='./data/table2.csv', output='t2')
         cls.runModule('v.db.connect', map='test_vector', table='t1', key='cat_', layer=1)
         cls.runModule('v.db.connect', map='test_vector', table='t2', key='cat_', layer=2)
 
     @classmethod
     def tearDownClass(cls):
-        cls.runModule('g.remove', type='vect', name='test_vector', flags='f')
+        cls.runModule('g.remove', type='vector', name='test_vector', flags='f')
 
     def setUp(self):
         self.vwhat = SimpleModule('v.what', map='test_vector',



More information about the grass-commit mailing list