[GRASS-SVN] r68722 - grass-addons/grass7/raster/r.forestfrag/testsuite

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jun 21 19:25:39 PDT 2016


Author: wenzeslaus
Date: 2016-06-21 19:25:39 -0700 (Tue, 21 Jun 2016)
New Revision: 68722

Modified:
   grass-addons/grass7/raster/r.forestfrag/testsuite/r_forestfrag_ncspm.py
   grass-addons/grass7/raster/r.forestfrag/testsuite/r_forestfrag_xy.py
Log:
r.forestfrag: fix test reference data after r68717 (see #3067)

Modified: grass-addons/grass7/raster/r.forestfrag/testsuite/r_forestfrag_ncspm.py
===================================================================
--- grass-addons/grass7/raster/r.forestfrag/testsuite/r_forestfrag_ncspm.py	2016-06-22 02:22:42 UTC (rev 68721)
+++ grass-addons/grass7/raster/r.forestfrag/testsuite/r_forestfrag_ncspm.py	2016-06-22 02:25:39 UTC (rev 68722)
@@ -1,3 +1,18 @@
+#!/usr/bin/env python
+
+############################################################################
+#
+# MODULE:        r_forestfrag_ncspm
+# AUTHOR:        Vaclav Petras
+# PURPOSE:       Test using NC SPM data
+# COPYRIGHT:     (C) 2016 by Vaclav Petras and the GRASS Development Team
+#
+#                This program is free software under the GNU General Public
+#                License (>=v2). Read the file COPYING that comes with GRASS
+#                for details.
+#
+#############################################################################
+
 from grass.gunittest.case import TestCase
 from grass.gunittest.main import test
 import grass.script.raster as gr
@@ -38,8 +53,8 @@
                                   reference=ref, precision=0.0006)
         ref = dict(n=249323, null_cells=1, cells=249324, min=0, max=5,
                    range=5, mean=2.2925, mean_of_abs=2.2925,
-                   stddev=2.3564, variance=5.5526, coeff_var=102.7886,
-                   sum=571564)
+                   stddev=2.3564, variance=5.5527, coeff_var=102.7879,
+                   sum=571572)
         self.assertRasterFitsUnivar(raster=self.forest_frag,
                                     reference=ref, precision=0.0006)
 

Modified: grass-addons/grass7/raster/r.forestfrag/testsuite/r_forestfrag_xy.py
===================================================================
--- grass-addons/grass7/raster/r.forestfrag/testsuite/r_forestfrag_xy.py	2016-06-22 02:22:42 UTC (rev 68721)
+++ grass-addons/grass7/raster/r.forestfrag/testsuite/r_forestfrag_xy.py	2016-06-22 02:25:39 UTC (rev 68722)
@@ -1,3 +1,19 @@
+#!/usr/bin/env python
+
+############################################################################
+#
+# MODULE:        r_forestfrag_xy
+# AUTHOR:        Vaclav Petras
+# PURPOSE:       Test with complete but small ref output (diff windows)
+# COPYRIGHT:     (C) 2016 by Vaclav Petras and the GRASS Development Team
+#
+#                This program is free software under the GNU General Public
+#                License (>=v2). Read the file COPYING that comes with GRASS
+#                for details.
+#
+#############################################################################
+
+
 from grass.gunittest.case import TestCase
 from grass.gunittest.main import test
 
@@ -74,7 +90,7 @@
 cols: 35
 0 0 0 0 0 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 0 0 0 2 1 1 1 0 0 0 1
 0 0 0 0 0 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 0 0 0 0 0 0 0 0 0 0 0
-0 0 0 3 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 3 3 0 0 0 0 0 0 0 0 0
+0 0 0 3 3 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 3 3 0 0 0 0 0 0 0 0 0
 0 0 3 3 3 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 3 3 0 0 0 0 0 0 0 0 0
 0 0 3 3 4 5 5 5 5 5 5 5 5 5 5 4 3 3 4 3 4 4 4 4 3 3 0 0 0 1 0 0 0 0 0
 0 0 4 5 5 5 5 5 5 5 5 5 5 5 4 3 3 3 3 3 3 3 4 3 3 3 3 0 0 2 2 0 0 0 0
@@ -106,9 +122,9 @@
 0 0 0 0 0 0 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 0 0 0 2 2 1 1 1 0 0 0 1
 0 0 0 0 0 0 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 0 0 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 0 0 0 0 0 0 0 0 0 0 0 0
-0 0 0 3 3 3 5 5 5 5 5 5 5 5 4 4 4 4 4 4 4 4 4 4 4 3 0 0 0 0 0 0 0 0 0
-0 0 0 3 3 3 5 5 5 5 5 5 5 4 4 4 4 4 4 4 4 4 4 4 3 3 0 0 0 1 0 0 0 0 0
-0 0 0 3 3 3 3 3 3 4 5 5 4 4 4 4 4 4 4 4 4 4 4 4 3 3 3 0 0 2 2 0 0 0 0
+0 0 0 3 3 3 5 5 5 5 5 5 5 5 4 3 3 3 4 4 4 4 4 4 3 3 0 0 0 0 0 0 0 0 0
+0 0 0 3 3 3 5 5 5 5 5 5 5 4 3 3 3 3 3 3 3 3 3 3 3 3 0 0 0 1 0 0 0 0 0
+0 0 0 3 3 3 3 3 3 4 5 5 4 3 3 3 3 4 3 4 4 4 4 4 3 3 3 0 0 2 2 0 0 0 0
 0 0 0 3 3 3 3 3 3 3 5 5 4 4 4 4 4 0 0 0 4 0 4 4 3 3 3 3 2 2 2 1 1 0 0
 0 2 2 2 3 3 3 3 3 3 5 5 4 4 4 4 0 0 0 0 0 0 4 4 3 3 3 3 2 2 2 1 1 0 0
 0 0 0 0 0 0 0 3 3 3 5 5 4 4 4 0 0 4 4 4 4 0 4 3 3 3 3 2 2 2 1 1 0 0 0
@@ -201,8 +217,8 @@
         self.use_temp_region()
         self.runModule('r.in.ascii', input='-', stdin_=FOREST,
                        output=self.forest)
+        self.to_remove.append(self.forest)
         self.runModule('g.region', raster=self.forest)
-        self.to_remove.append(self.forest)
 
     def tearDown(self):
         self.del_temp_region()



More information about the grass-commit mailing list