[GRASS-SVN] r74235 - in grass/trunk/scripts/v.dissolve: . testsuite
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Mar 13 00:28:18 PDT 2019
Author: lucadelu
Date: 2019-03-13 00:28:17 -0700 (Wed, 13 Mar 2019)
New Revision: 74235
Added:
grass/trunk/scripts/v.dissolve/testsuite/
grass/trunk/scripts/v.dissolve/testsuite/test_v_dissolve.py
Log:
v.dissolve: added test, thanks to Sanjeet Bhatti
Added: grass/trunk/scripts/v.dissolve/testsuite/test_v_dissolve.py
===================================================================
--- grass/trunk/scripts/v.dissolve/testsuite/test_v_dissolve.py (rev 0)
+++ grass/trunk/scripts/v.dissolve/testsuite/test_v_dissolve.py 2019-03-13 07:28:17 UTC (rev 74235)
@@ -0,0 +1,40 @@
+"""
+Created on Sun Jun 08 23:58:10 2018
+
+ at author: Sanjeet Bhatti
+"""
+
+from grass.gunittest.case import TestCase
+from grass.gunittest.main import test
+from grass.gunittest.gmodules import SimpleModule
+
+from grass.script.core import run_command
+
+
+class TestVDissolve(TestCase):
+ """Test v.dissolve script"""
+
+ mapName = 'mysoils_general'
+ outputName = 'mysoils_general_families'
+
+ @classmethod
+ def setUpClass(cls):
+ """Copy vect"""
+ run_command('g.copy', vector='soils_general,mysoils_general')
+
+ @classmethod
+ def tearDownClass(cls):
+ """Remove vector"""
+ run_command('g.remove', flags='f', type='vector',
+ name=(cls.mapName, cls.outputName))
+
+ def test_dissolve(self):
+ """dissolve test"""
+ module = SimpleModule('v.dissolve', input=self.mapName,
+ output=self.outputName, column='GSL_NAME')
+ self.assertModule(module)
+
+ self.assertVectorExists(self.outputName)
+
+if __name__ == '__main__':
+ test()
Property changes on: grass/trunk/scripts/v.dissolve/testsuite/test_v_dissolve.py
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/x-python
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
More information about the grass-commit
mailing list