[GRASS-SVN] r74263 - grass/trunk/raster/r.random/testsuite
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Mar 15 05:42:48 PDT 2019
Author: sbl
Date: 2019-03-15 05:42:48 -0700 (Fri, 15 Mar 2019)
New Revision: 74263
Modified:
grass/trunk/raster/r.random/testsuite/testrandom.py
Log:
fix failling r.random test
Modified: grass/trunk/raster/r.random/testsuite/testrandom.py
===================================================================
--- grass/trunk/raster/r.random/testsuite/testrandom.py 2019-03-14 20:41:01 UTC (rev 74262)
+++ grass/trunk/raster/r.random/testsuite/testrandom.py 2019-03-15 12:42:48 UTC (rev 74263)
@@ -1,12 +1,12 @@
"""
Name: r.random test
Purpose: Tests r.to.vect and its flags/options.
-
+
Author: Sunveer Singh, Google Code-in 2018
Copyright: (C) 2017 by Sunveer 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.
+ License (>=v2). Read the file COPYING that comes with GRASS
+ for details.
"""
from grass.gunittest.case import TestCase
from grass.gunittest.main import test
@@ -13,6 +13,7 @@
from grass.gunittest.gmodules import SimpleModule
class Testrr(TestCase):
+
input='lakes'
cover="elevation"
raster="routfile"
@@ -28,10 +29,11 @@
cls.del_temp_region()
def tearDown(self):
- """Remove the vector map after each test method"""
- self.runModule('g.remove', flags='f', type='vector', name=self.vector)
- self.runModule('g.remove', flags='f', type='raster', name=self.raster)
+ """Remove the vector map after each test method"""
+ self.runModule('g.remove', flags='f', type='vector', name=self.vector)
+ self.runModule('g.remove', flags='f', type='raster', name=self.raster)
+
def test_flag_z(self):
"""Testing flag z"""
string="""area_cat|count|sum
@@ -59,14 +61,16 @@
self.assertModule('r.random', input=self.input, cover=self.cover, npoints=100, vector=self.vector, flags='d')
self.assertModule('v.info', map=self.vector, flags='t')
topology = dict(points=100, lines=0, areas=0, map3d=1)
- self.assertVectorFitsTopoInfo(self.vector, topology)
+ self.assertVectorFitsTopoInfo(self.vector, topology)
def test_flag_b(self):
"""Testing flag b"""
- self.assertModule('r.random', input=self.input, cover=self.cover, npoints=36011, vector=self.vector, flags='b')
+ self.assertModule('r.random', input=self.input, cover=self.cover,
+ npoints=36011, vector=self.vector, flags='b',
+ overwrite=True)
self.assertModule('v.info', map=self.vector, flags='t')
topology = dict(points=36011, lines=0, areas=0)
- self.assertVectorFitsTopoInfo(self.vector, topology)
+ self.assertVectorFitsTopoInfo(self.vector, topology)
More information about the grass-commit
mailing list