[GRASS-SVN] r74233 - grass/trunk/scripts/v.unpack/testsuite
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Mar 13 00:21:20 PDT 2019
Author: lucadelu
Date: 2019-03-13 00:21:20 -0700 (Wed, 13 Mar 2019)
New Revision: 74233
Added:
grass/trunk/scripts/v.unpack/testsuite/test_v_unpack.py
Log:
v.unpack: added test
Added: grass/trunk/scripts/v.unpack/testsuite/test_v_unpack.py
===================================================================
--- grass/trunk/scripts/v.unpack/testsuite/test_v_unpack.py (rev 0)
+++ grass/trunk/scripts/v.unpack/testsuite/test_v_unpack.py 2019-03-13 07:21:20 UTC (rev 74233)
@@ -0,0 +1,38 @@
+"""
+Created on Sun Jun 08 12:50:45 2018
+
+ at author: Sanjeet Bhatti
+"""
+
+from grass.gunittest.case import TestCase
+from grass.gunittest.main import test
+from grass.gunittest.gmodules import SimpleModule
+
+import os
+
+
+class TestVUnpack(TestCase):
+ """Test v.unpack script"""
+
+ mapName = 'roadsmajor'
+ packFile = 'roadsmajor.pack'
+
+ @classmethod
+ def setUpClass(cls):
+ """Run v.pack to create packfile."""
+ cls.runModule('v.pack', input=cls.mapName, output=cls.packFile)
+
+ @classmethod
+ def tearDownClass(cls):
+ """Remove pack file created region"""
+ cls.runModule('g.remove', type='vector', name=cls.mapName, flags='f')
+ if (os.path.isfile(cls.packFile)):
+ os.remove(cls.packFile)
+
+ def test_v_pack(self):
+ """Unpack file test"""
+ module = SimpleModule('v.unpack', input=self.packFile, overwrite=True)
+ self.assertModule(module)
+
+if __name__ == '__main__':
+ test()
More information about the grass-commit
mailing list