[GRASS-SVN] r72686 - grass/trunk/raster/r.mode/testsuite

svn_grass at osgeo.org svn_grass at osgeo.org
Fri May 4 20:47:30 PDT 2018


Author: annakrat
Date: 2018-05-04 20:47:30 -0700 (Fri, 04 May 2018)
New Revision: 72686

Modified:
   grass/trunk/raster/r.mode/testsuite/testrmode.py
Log:
r.mode: fix nonsense testsuite

Modified: grass/trunk/raster/r.mode/testsuite/testrmode.py
===================================================================
--- grass/trunk/raster/r.mode/testsuite/testrmode.py	2018-05-05 03:32:36 UTC (rev 72685)
+++ grass/trunk/raster/r.mode/testsuite/testrmode.py	2018-05-05 03:47:30 UTC (rev 72686)
@@ -1,7 +1,7 @@
 """
 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
@@ -13,10 +13,11 @@
 from grass.gunittest.case import TestCase
 from grass.gunittest.main import test
 
+
 class Testrmode(TestCase):
-    output='rmode'
-    base='geology'
-    cover='soils'
+    output = 'rmode'
+    base = 'geology'
+    cover = 'soils'
 
     @classmethod
     def setUpClass(cls):
@@ -31,23 +32,10 @@
         self.runModule('g.remove', type='raster', flags='f', name=self.output)
 
     def test_1(self):
-        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")
+        self.assertRasterMinMax(map=self.output, refmin=21513, refmax=46487,
+                                msg="soils must be between 21513 and 46487")
 
-    def test_2(self):
-        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=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