Changeset 68722
- Timestamp:
- Jun 21, 2016, 7:25:39 PM (8 years ago)
- Location:
- grass-addons/grass7/raster/r.forestfrag/testsuite
- Files:
-
- 2 edited
-
r_forestfrag_ncspm.py (modified) (2 diffs)
-
r_forestfrag_xy.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
grass-addons/grass7/raster/r.forestfrag/testsuite/r_forestfrag_ncspm.py
r68693 r68722 1 #!/usr/bin/env python 2 3 ############################################################################ 4 # 5 # MODULE: r_forestfrag_ncspm 6 # AUTHOR: Vaclav Petras 7 # PURPOSE: Test using NC SPM data 8 # COPYRIGHT: (C) 2016 by Vaclav Petras and the GRASS Development Team 9 # 10 # This program is free software under the GNU General Public 11 # License (>=v2). Read the file COPYING that comes with GRASS 12 # for details. 13 # 14 ############################################################################# 15 1 16 from grass.gunittest.case import TestCase 2 17 from grass.gunittest.main import test … … 39 54 ref = dict(n=249323, null_cells=1, cells=249324, min=0, max=5, 40 55 range=5, mean=2.2925, mean_of_abs=2.2925, 41 stddev=2.3564, variance=5.552 6, coeff_var=102.7886,42 sum=5715 64)56 stddev=2.3564, variance=5.5527, coeff_var=102.7879, 57 sum=571572) 43 58 self.assertRasterFitsUnivar(raster=self.forest_frag, 44 59 reference=ref, precision=0.0006) -
grass-addons/grass7/raster/r.forestfrag/testsuite/r_forestfrag_xy.py
r68698 r68722 1 #!/usr/bin/env python 2 3 ############################################################################ 4 # 5 # MODULE: r_forestfrag_xy 6 # AUTHOR: Vaclav Petras 7 # PURPOSE: Test with complete but small ref output (diff windows) 8 # COPYRIGHT: (C) 2016 by Vaclav Petras and the GRASS Development Team 9 # 10 # This program is free software under the GNU General Public 11 # License (>=v2). Read the file COPYING that comes with GRASS 12 # for details. 13 # 14 ############################################################################# 15 16 1 17 from grass.gunittest.case import TestCase 2 18 from grass.gunittest.main import test … … 75 91 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 76 92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 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 … … 202 218 self.runModule('r.in.ascii', input='-', stdin_=FOREST, 203 219 output=self.forest) 220 self.to_remove.append(self.forest) 204 221 self.runModule('g.region', raster=self.forest) 205 self.to_remove.append(self.forest)206 222 207 223 def tearDown(self):
Note:
See TracChangeset
for help on using the changeset viewer.
