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

Hi,

I just wanted to point out, that some of the newly added tests were
actually not testing anything (see below) or failing because of
whitespace, please be more careful what you commit.

Thank you,

Anna

On Fri, May 4, 2018 at 11:47 PM, <svn_grass@osgeo.org> wrote:

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()
-

_______________________________________________
grass-commit mailing list
grass-commit@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-commit

On 5 May 2018 at 05:57, Anna Petrášová <kratochanna@gmail.com> wrote:

Hi,

Hi,

I just wanted to point out, that some of the newly added tests were
actually not testing anything (see below) or failing because of
whitespace, please be more careful what you commit.

sorry, but I usually test them, maybe I skip some.
However some tests are failing because in the basic_north_carolina
doesn't contain some useful maps like landsat for i.* commands.

what do you think to use the full North Casolina dataset as default
one? If there consensus I could try to fix the failing tests

Thank you,

Anna

--
ciao
Luca

www.lucadelu.org