[GRASS-SVN] r66553 - in grass/trunk/lib/python/temporal: . testsuite

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Oct 21 03:09:56 PDT 2015


Author: huhabla
Date: 2015-10-21 03:09:56 -0700 (Wed, 21 Oct 2015)
New Revision: 66553

Modified:
   grass/trunk/lib/python/temporal/c_libraries_interface.py
   grass/trunk/lib/python/temporal/testsuite/unittests_temporal_algebra.py
   grass/trunk/lib/python/temporal/testsuite/unittests_temporal_algebra_grs.py
   grass/trunk/lib/python/temporal/testsuite/unittests_temporal_conditionals.py
   grass/trunk/lib/python/temporal/testsuite/unittests_temporal_raster_algebra.py
   grass/trunk/lib/python/temporal/testsuite/unittests_temporal_raster_algebra_grs.py
   grass/trunk/lib/python/temporal/testsuite/unittests_temporal_vector_algebra.py
Log:
temporal framework: Fixed several tests that were using wrong t.register calls


Modified: grass/trunk/lib/python/temporal/c_libraries_interface.py
===================================================================
--- grass/trunk/lib/python/temporal/c_libraries_interface.py	2015-10-21 10:07:51 UTC (rev 66552)
+++ grass/trunk/lib/python/temporal/c_libraries_interface.py	2015-10-21 10:09:56 UTC (rev 66553)
@@ -1008,16 +1008,16 @@
            True
            >>> ciface.read_raster_info("test", tgis.get_current_mapset())
            {'rows': 12, 'north': 80.0, 'min': 1, 'datatype': 'CELL', 'max': 1, 'ewres': 10.0, 'cols': 8, 'west': 0.0, 'east': 120.0, 'nsres': 10.0, 'south': 0.0}
-           
-           >>> info = ciface.read_raster_full_info("test", tgis.get_current_mapset()) 
+
+           >>> info = ciface.read_raster_full_info("test", tgis.get_current_mapset())
            >>> info           # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
-           {u'tbres': 1.0, ... 'keyword': 'generated by r.mapcalc', 
+           {u'tbres': 1.0, ... 'keyword': 'generated by r.mapcalc',
             u'bottom': 0.0, 'end_time': None, 'title': 'test', u'south': 0.0}
 
            >>> info["start_time"]
            datetime.datetime(1995, 3, 12, 10, 34, 40)
            >>> info["end_time"]
-           
+
            >>> check = ciface.has_raster_timestamp("test", tgis.get_current_mapset())
            >>> print check
            True
@@ -1084,7 +1084,7 @@
            >>> kvp["start_time"]
            datetime.datetime(1995, 3, 12, 10, 34, 40)
            >>> kvp["end_time"]
-           
+
            >>> check = ciface.has_vector_timestamp("test", tgis.get_current_mapset(), None)
            >>> print check
            True
@@ -1111,25 +1111,25 @@
            >>> location = ciface.get_location()
            >>> gisdbase = ciface.get_gisdbase()
 
-           >>> ciface.fatal_error()
+           >>> ciface.fatal_error() # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
            Traceback (most recent call last):
-               raise FatalError(message)
-           FatalError: Fatal error
+               raise FatalError("Exception raised: " + str(e) + " Message: " + message)
+           FatalError: Exception raised:  ...
 
-           >>> ciface.fatal_error()
+           >>> ciface.fatal_error() # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
            Traceback (most recent call last):
-               raise FatalError(message)
-           FatalError: Fatal error
+               raise FatalError("Exception raised: " + str(e) + " Message: " + message)
+           FatalError: Exception raised:  ...
 
-           >>> ciface.fatal_error()
+           >>> ciface.fatal_error() # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
            Traceback (most recent call last):
-               raise FatalError(message)
-           FatalError: Fatal error
+               raise FatalError("Exception raised: " + str(e) + " Message: " + message)
+           FatalError: Exception raised:  ...
 
-           >>> ciface.fatal_error()
+           >>> ciface.fatal_error() # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
            Traceback (most recent call last):
-               raise FatalError(message)
-           FatalError: Fatal error
+               raise FatalError("Exception raised: " + str(e) + " Message: " + message)
+           FatalError: Exception raised:  ...
 
            >>> ciface.stop()
 

Modified: grass/trunk/lib/python/temporal/testsuite/unittests_temporal_algebra.py
===================================================================
--- grass/trunk/lib/python/temporal/testsuite/unittests_temporal_algebra.py	2015-10-21 10:07:51 UTC (rev 66552)
+++ grass/trunk/lib/python/temporal/testsuite/unittests_temporal_algebra.py	2015-10-21 10:09:56 UTC (rev 66553)
@@ -56,7 +56,7 @@
         tgis.register_maps_in_space_time_dataset(type="raster", name="D", maps="d1,d2,d3",
                                                  start="2001-01-03", increment="1 day", interval=True)
         tgis.register_maps_in_space_time_dataset(type="raster", name=None,  maps="singletmap", 
-                                                start="2001-01-03", end="2001-01-04", interval=True)
+                                                 start="2001-01-03", end="2001-01-04")
 
     def tearDown(self):
         self.runModule("t.remove", inputs="R", quiet=True)

Modified: grass/trunk/lib/python/temporal/testsuite/unittests_temporal_algebra_grs.py
===================================================================
--- grass/trunk/lib/python/temporal/testsuite/unittests_temporal_algebra_grs.py	2015-10-21 10:07:51 UTC (rev 66552)
+++ grass/trunk/lib/python/temporal/testsuite/unittests_temporal_algebra_grs.py	2015-10-21 10:09:56 UTC (rev 66553)
@@ -62,7 +62,7 @@
         tgis.register_maps_in_space_time_dataset(type="raster", name="D", maps="d3",
                                                  start="2001-05-01", increment="31 days", interval=True)
         tgis.register_maps_in_space_time_dataset(type="raster", name=None,  maps="singletmap", 
-                                                start="2001-01-03", end="2001-01-04", interval=True)
+                                                start="2001-01-03", end="2001-01-04")
 
     def tearDown(self):
         pass

Modified: grass/trunk/lib/python/temporal/testsuite/unittests_temporal_conditionals.py
===================================================================
--- grass/trunk/lib/python/temporal/testsuite/unittests_temporal_conditionals.py	2015-10-21 10:07:51 UTC (rev 66552)
+++ grass/trunk/lib/python/temporal/testsuite/unittests_temporal_conditionals.py	2015-10-21 10:09:56 UTC (rev 66553)
@@ -63,7 +63,7 @@
         tgis.register_maps_in_space_time_dataset(type="raster", name="E", maps="e1,e2,e3",
                                                  start="2000-12-31", increment="2 day", interval=True)
         tgis.register_maps_in_space_time_dataset(type="raster", name=None,  maps="singletmap", 
-                                                start="2001-01-03", end="2001-01-04", interval=True)
+                                                start="2001-01-03", end="2001-01-04")
 
     def tearDown(self):
         self.runModule("t.remove", inputs="R", quiet=True)

Modified: grass/trunk/lib/python/temporal/testsuite/unittests_temporal_raster_algebra.py
===================================================================
--- grass/trunk/lib/python/temporal/testsuite/unittests_temporal_raster_algebra.py	2015-10-21 10:07:51 UTC (rev 66552)
+++ grass/trunk/lib/python/temporal/testsuite/unittests_temporal_raster_algebra.py	2015-10-21 10:09:56 UTC (rev 66553)
@@ -55,7 +55,7 @@
         tgis.register_maps_in_space_time_dataset(type="raster", name="D", maps="d1,d2,d3",
                                                  start="2001-01-03", increment="1 day", interval=True)                                                 
         tgis.register_maps_in_space_time_dataset(type="raster", name=None,  maps="singletmap", 
-                                                start="2001-01-03", end="2001-01-04", interval=True)
+                                                start="2001-01-03", end="2001-01-04")
         
     def tearDown(self):
         self.runModule("t.remove", flags="rf", inputs="R", quiet=True)

Modified: grass/trunk/lib/python/temporal/testsuite/unittests_temporal_raster_algebra_grs.py
===================================================================
--- grass/trunk/lib/python/temporal/testsuite/unittests_temporal_raster_algebra_grs.py	2015-10-21 10:07:51 UTC (rev 66552)
+++ grass/trunk/lib/python/temporal/testsuite/unittests_temporal_raster_algebra_grs.py	2015-10-21 10:09:56 UTC (rev 66553)
@@ -60,7 +60,7 @@
         tgis.register_maps_in_space_time_dataset(type="raster", name="D", maps="d3",
                                                  start="2001-05-01", increment="5 days", interval=True)
         tgis.register_maps_in_space_time_dataset(type="raster", name=None,  maps="singletmap", 
-                                                start="2001-03-01", end="2001-04-01", interval=True)
+                                                start="2001-03-01", end="2001-04-01")
         
     def tearDown(self):
         return

Modified: grass/trunk/lib/python/temporal/testsuite/unittests_temporal_vector_algebra.py
===================================================================
--- grass/trunk/lib/python/temporal/testsuite/unittests_temporal_vector_algebra.py	2015-10-21 10:07:51 UTC (rev 66552)
+++ grass/trunk/lib/python/temporal/testsuite/unittests_temporal_vector_algebra.py	2015-10-21 10:09:56 UTC (rev 66553)
@@ -55,7 +55,7 @@
         tgis.register_maps_in_space_time_dataset(type="vector", name="D", maps="d1,d2,d3",
                                                  start="2001-01-03", increment="1 day", interval=True)
         tgis.register_maps_in_space_time_dataset(type="vector", name=None,  maps="singletmap", 
-                                                start="2001-01-03", end="2001-01-04", interval=True)
+                                                start="2001-01-03", end="2001-01-04")
     
     def tearDown(self):
         self.runModule("t.remove", type="stvds", inputs="R", quiet=True)



More information about the grass-commit mailing list