[GRASS-SVN] r72578 - grass/trunk/raster/r.mode/testsuite
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Mar 25 08:30:33 PDT 2018
Author: lucadelu
Date: 2018-03-25 08:30:33 -0700 (Sun, 25 Mar 2018)
New Revision: 72578
Modified:
grass/trunk/raster/r.mode/testsuite/testrmode.py
Log:
r.mode: fixed tests using nc_basic_spm_grass7 location
Modified: grass/trunk/raster/r.mode/testsuite/testrmode.py
===================================================================
--- grass/trunk/raster/r.mode/testsuite/testrmode.py 2018-03-25 14:51:11 UTC (rev 72577)
+++ grass/trunk/raster/r.mode/testsuite/testrmode.py 2018-03-25 15:30:33 UTC (rev 72578)
@@ -1,8 +1,13 @@
"""
Name: r.mode test
Purpose: Tests r.mode and its flags/options.
-
+
Author: Supreet Singh
+Copyright: (C) 2018 by Supreet Singh and the GRASS Development Team
+Licence: 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
@@ -10,13 +15,13 @@
class Testrmode(TestCase):
output='rmode'
- base='facility'
- cover='soils_Kfactor'
+ base='geology'
+ cover='soils'
@classmethod
def setUpClass(cls):
cls.use_temp_region()
- cls.runModule('g.region', flags='d')
+ cls.runModule('g.region', raster=cls.base, flags='d')
@classmethod
def tearDownClass(cls):
@@ -26,28 +31,22 @@
self.runModule('g.remove', type='raster', flags='f', name=self.output)
def test_1(self):
- facility='facility'
- self.assertModule('r.mode', base=self.base, cover=self.cover,
- output=self.output)
- self.assertRasterMinMax(map=facility, refmin=1, refmax=1,
- msg="facility in degrees must be between "
- "1 and 1")
+ soilsID='soils'
+ self.assertModule('r.mode', base=self.base, cover=self.cover, output=self.output)
+ self.assertRasterMinMax(map=soilsID, refmin=18683, refmax=46555,
+ msg="soilsID in degrees must be between 18683 and 46555")
def test_2(self):
- slope='slope'
- self.assertModule('r.mode', base=self.base, cover=self.cover,
- output=self.output)
- self.assertRasterMinMax(map=slope, refmin=0, refmax=38.68939,
- msg="slope in degrees must be between 0 and "
- "38.68939")
+ lakes='lakes'
+ self.assertModule('r.mode', base=self.base, cover=self.cover, output=self.output)
+ self.assertRasterMinMax(map=lakes, refmin=34300, refmax=43600,
+ msg="lakes in degrees must be between 34300 and 43600")
def test_3(self):
elevation='elevation'
- self.assertModule('r.mode', base=self.base, cover=self.cover,
- output=self.output)
- self.assertRasterMinMax(map=elevation, refmin=55.57879,
- refmax=156.3299, msg="elevation in degrees "
- "must be between 55.57879 and 156.3299")
+ self.assertModule('r.mode', base=self.base, cover=self.cover, output=self.output)
+ self.assertRasterMinMax(map=elevation, refmin=2, refmax=4,
+ msg="elevation in degrees must be between NULL and NULL")
if __name__ == '__main__':
test()
More information about the grass-commit
mailing list