[GRASS-SVN] r74249 - in grass/trunk/scripts/r.plane: . testsuite

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Mar 13 11:53:22 PDT 2019


Author: lucadelu
Date: 2019-03-13 11:53:22 -0700 (Wed, 13 Mar 2019)
New Revision: 74249

Added:
   grass/trunk/scripts/r.plane/testsuite/
   grass/trunk/scripts/r.plane/testsuite/test_r_plane.py
Log:
r.plane: added test, thanks to Sanjeet Bhatti

Added: grass/trunk/scripts/r.plane/testsuite/test_r_plane.py
===================================================================
--- grass/trunk/scripts/r.plane/testsuite/test_r_plane.py	                        (rev 0)
+++ grass/trunk/scripts/r.plane/testsuite/test_r_plane.py	2019-03-13 18:53:22 UTC (rev 74249)
@@ -0,0 +1,41 @@
+"""
+Created on Sun Jun 08 12:12:34 2018
+
+ at author: Sanjeet Bhatti
+"""
+
+from grass.gunittest.case import TestCase
+from grass.gunittest.main import test
+from grass.gunittest.gmodules import SimpleModule
+
+
+class TestRPlane(TestCase):
+    """Test r.plane script"""
+
+    mapName = 'elevation'
+    mapOutput = 'myplane45'
+
+    @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"""
+        cls.runModule('g.remove', flags='f', type='raster',
+                      name=cls.mapOutput)
+        cls.del_temp_region()
+
+    def test_creates_raster_plane_map(self):
+        """Create a tilted plane raster map test"""
+        module = SimpleModule('r.plane', output=self.mapOutput, dip=45,
+                              easting=527500.0, northing=165000.0,
+                              elevation=1000, type='FCELL')
+        self.assertModule(module)
+
+        self.assertRasterExists(self.mapOutput)
+
+if __name__ == '__main__':
+    test()


Property changes on: grass/trunk/scripts/r.plane/testsuite/test_r_plane.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