[GRASS-SVN] r74254 - in grass/trunk/scripts/r.pack: . testsuite
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Mar 13 12:53:05 PDT 2019
Author: lucadelu
Date: 2019-03-13 12:53:05 -0700 (Wed, 13 Mar 2019)
New Revision: 74254
Added:
grass/trunk/scripts/r.pack/testsuite/
grass/trunk/scripts/r.pack/testsuite/test_r_pack.py
Log:
r.pack: added test, thanks to Sanjeet Bhatti
Added: grass/trunk/scripts/r.pack/testsuite/test_r_pack.py
===================================================================
--- grass/trunk/scripts/r.pack/testsuite/test_r_pack.py (rev 0)
+++ grass/trunk/scripts/r.pack/testsuite/test_r_pack.py 2019-03-13 19:53:05 UTC (rev 74254)
@@ -0,0 +1,43 @@
+"""
+Created on Sun Jun 08 10:15:22 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 TestRPack(TestCase):
+ """Test r.pack script"""
+
+ mapName = 'aspect'
+ outFile = 'aspect.pack'
+
+ @classmethod
+ def setUpClass(cls):
+ """Create maps in a small region."""
+ cls.use_temp_region()
+ cls.runModule('g.region', raster=cls.mapName, flags='p')
+
+ @classmethod
+ def tearDownClass(cls):
+ """Remove temporary region. Delete output file"""
+ cls.del_temp_region()
+
+ if (os.path.isfile(cls.outFile)):
+ os.remove(cls.outFile)
+
+ def test_r_pack(self):
+ """Create a pack file test"""
+ module = SimpleModule('r.pack', input=self.mapName,
+ output=self.outFile)
+ self.assertModule(module)
+
+ self.assertFileExists(filename=self.outFile)
+
+if __name__ == '__main__':
+ test()
Property changes on: grass/trunk/scripts/r.pack/testsuite/test_r_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