[GRASS-SVN] r74256 - in grass/trunk/scripts/v.pack: . testsuite

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Mar 13 12:56:08 PDT 2019


Author: lucadelu
Date: 2019-03-13 12:56:08 -0700 (Wed, 13 Mar 2019)
New Revision: 74256

Added:
   grass/trunk/scripts/v.pack/testsuite/
   grass/trunk/scripts/v.pack/testsuite/test_v_pack.py
Log:
v.pack: added test, thanks to Sanjeet Bhatti

Added: grass/trunk/scripts/v.pack/testsuite/test_v_pack.py
===================================================================
--- grass/trunk/scripts/v.pack/testsuite/test_v_pack.py	                        (rev 0)
+++ grass/trunk/scripts/v.pack/testsuite/test_v_pack.py	2019-03-13 19:56:08 UTC (rev 74256)
@@ -0,0 +1,35 @@
+"""
+Created on Sun Jun 08 23:19:09 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 TestVPack(TestCase):
+    """Test v.pack script"""
+
+    mapName = 'roadsmajor'
+    outFile = 'roadsmajor.pack'
+
+    @classmethod
+    def tearDownClass(cls):
+        """Remove output file"""
+        if (os.path.isfile(cls.outFile)):
+            os.remove(cls.outFile)
+
+    def test_v_pack(self):
+        """Create a pack file test"""
+        module = SimpleModule('v.pack', input=self.mapName,
+                              output=self.outFile, overwrite=True)
+        self.assertModule(module)
+
+        self.assertFileExists(filename=self.outFile)
+
+if __name__ == '__main__':
+    test()


Property changes on: grass/trunk/scripts/v.pack/testsuite/test_v_pack.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