[GRASS-SVN] r62815 - grass/trunk/temporal/t.rast.algebra/testsuite

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Nov 19 08:42:14 PST 2014


Author: huhabla
Date: 2014-11-19 08:42:14 -0800 (Wed, 19 Nov 2014)
New Revision: 62815

Modified:
   grass/trunk/temporal/t.rast.algebra/testsuite/test_raster_algebra.py
   grass/trunk/temporal/t.rast.algebra/testsuite/test_raster_algebra_fails.py
Log:
temporal modules: Fixed algebra tests 


Modified: grass/trunk/temporal/t.rast.algebra/testsuite/test_raster_algebra.py
===================================================================
--- grass/trunk/temporal/t.rast.algebra/testsuite/test_raster_algebra.py	2014-11-19 16:41:27 UTC (rev 62814)
+++ grass/trunk/temporal/t.rast.algebra/testsuite/test_raster_algebra.py	2014-11-19 16:42:14 UTC (rev 62815)
@@ -90,7 +90,7 @@
     def test_simple_arith_hash_1(self):
         """Simple arithmetic test including the hash operator"""
        
-        self.assertModule("t.rast.algebra",  expression='R = A + A {#, equal,l} A', basename="r")
+        self.assertModule("t.rast.algebra",  expression='R = A + (A {#, equal,l} A)', basename="r")
 
         D = tgis.open_old_stds("R", type="strds")
         

Modified: grass/trunk/temporal/t.rast.algebra/testsuite/test_raster_algebra_fails.py
===================================================================
--- grass/trunk/temporal/t.rast.algebra/testsuite/test_raster_algebra_fails.py	2014-11-19 16:41:27 UTC (rev 62814)
+++ grass/trunk/temporal/t.rast.algebra/testsuite/test_raster_algebra_fails.py	2014-11-19 16:42:14 UTC (rev 62815)
@@ -31,12 +31,14 @@
 
     def test_error_handling(self):        
         # Syntax error
-        self.assertModuleFail("t.rast.algebra",  expression="R == A {+,equal| precedes| follows,l} B", basename="r")
+        self.assertModuleFail("t.rast.algebra",  expression="R == A {+,equal| precedes| follows,l} B", 
+                                          basename="r")
         # No STRDS
         self.assertModuleFail("t.rast.algebra",  expression="R = NoSTRDS + NoSTRDS", basename="r")
         # No basename
         self.assertModuleFail("t.rast.algebra",  expression="R = A + B")
+        # Catch temporal lagebra expressions that are prohibited in the raster algebra
+        self.assertModuleFail("t.rast.algebra",  expression="R = strds(A) + strds(B)", basename="r")
 
-
 if __name__ == '__main__':
     gunittest.test()



More information about the grass-commit mailing list