[GRASS-SVN] r61224 - sandbox/wenzeslaus/gunittest

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jul 9 15:20:12 PDT 2014


Author: wenzeslaus
Date: 2014-07-09 15:20:12 -0700 (Wed, 09 Jul 2014)
New Revision: 61224

Modified:
   sandbox/wenzeslaus/gunittest/case.py
   sandbox/wenzeslaus/gunittest/checkers.py
Log:
gunittest: fix spelling

Modified: sandbox/wenzeslaus/gunittest/case.py
===================================================================
--- sandbox/wenzeslaus/gunittest/case.py	2014-07-09 21:47:37 UTC (rev 61223)
+++ sandbox/wenzeslaus/gunittest/case.py	2014-07-09 22:20:12 UTC (rev 61224)
@@ -33,7 +33,7 @@
     """
 
     Always use keyword arguments for all parameters other than first two. For
-    the firt two, it is recommened to use keyword arguments but not required.
+    the first two, it is recommended to use keyword arguments but not required.
     """
     longMessage = True  # to get both standard and custom message
     maxDiff = None  # we can afford long diffs
@@ -43,7 +43,7 @@
         super(TestCase, self).__init__(methodName)
 
     def _formatMessage(self, msg, standardMsg):
-        """Honour the longMessage attribute when generating failure messages.
+        """Honor the longMessage attribute when generating failure messages.
 
         If longMessage is False this means:
 
@@ -55,7 +55,7 @@
         * Use the standard message
         * If an explicit message is provided, return string with both messages
 
-        Based on Python unittest _formatMessage, formatting chanaged.
+        Based on Python unittest _formatMessage, formatting changed.
         """
         if not self.longMessage:
             return msg or standardMsg
@@ -75,7 +75,7 @@
         If you use this method, you have to call it in `setUpClass()`
         and call `del_temp_region()` in `tearDownClass()`. By this you
         ensure that each test method will have its own region and will
-        not influece other classes.
+        not influence other classes.
 
         ::
 
@@ -234,7 +234,7 @@
 
         Use keyword arguments syntax for all function parameters.
 
-        This function supports values obtainded -r (range) and
+        This function supports values obtained -r (range) and
         -e (extended metadata) flags.
         """
         self.assertCommandKeyValue(module='r.info',
@@ -278,7 +278,7 @@
     def assertRasterMinMax(self, map, refmin, refmax, msg=None):
         """Test that raster map minimum and maximum are within limits.
 
-        Map mimimum and maximum is tested against expression::
+        Map minimum and maximum is tested against expression::
 
             refmin <= actualmin and refmax >= actualmax
 
@@ -318,7 +318,7 @@
             stdmsg = 'File %s is empty' % filename
             self.fail(self._formatMessage(msg, stdmsg))
         if not skip_access_check and not os.access(filename, os.R_OK):
-            stdmsg = 'File %s is not accesible for reading' % filename
+            stdmsg = 'File %s is not accessible for reading' % filename
             self.fail(self._formatMessage(msg, stdmsg))
 
     def assertFileMd5(self, filename, md5, msg=None):
@@ -391,7 +391,7 @@
         """Test that `actual` raster is not different from `reference` raster
 
         Method behaves in the same way as `assertRasterFitsUnivar()`
-        but works on difference ``referece - actual``.
+        but works on difference ``reference - actual``.
         If statistics is not given ``dict(min=-precision, max=precision)``
         is used.
         """
@@ -413,7 +413,7 @@
 
     def assertRastersDifference(self, actual, reference,
                                 statistics, precision, msg=None):
-        """Test statistical values of differece of reference and actual rasters
+        """Test statistical values of difference of reference and actual rasters
 
         For cases when you are interested in no or minimal difference,
         use `assertRastersNoDifference()` instead.
@@ -432,7 +432,7 @@
     def runModule(cls, module, **kwargs):
         """Run PyGRASS module.
 
-        Runs the module and raises an expception if the module ends with
+        Runs the module and raises an exception if the module ends with
         non-zero return code. Usually, this is the same as testing the
         return code and raising exception but by using this method,
         you give testing framework more control over the execution,
@@ -490,7 +490,7 @@
     # it would be better to be able to use this multiple times
     # TODO: enable merging streams?
     def assertModule(self, module, msg=None, **kwargs):
-        """Run PyGRASS module in controled way and assert non-zero return code.
+        """Run PyGRASS module in controlled way and assert non-zero return code.
 
         You should use this method to invoke module you are testing.
         By using this method, you give testing framework more control over

Modified: sandbox/wenzeslaus/gunittest/checkers.py
===================================================================
--- sandbox/wenzeslaus/gunittest/checkers.py	2014-07-09 21:47:37 UTC (rev 61223)
+++ sandbox/wenzeslaus/gunittest/checkers.py	2014-07-09 22:20:12 UTC (rev 61224)
@@ -24,7 +24,7 @@
 def unify_projection(dic):
     """Unifies names of projections.
 
-    Some projections has possibily duplicate names like
+    Some projections are referred using different names like
     'Universal Transverse Mercator' and 'Universe Transverse Mercator'.
     This function replaces synonyms by a unified name.
 
@@ -155,7 +155,7 @@
     :return: a dictionary representation of text
     :return type: grass.script.core.KeyValue
 
-    And example of converting text with text, floats, integeres and list
+    And example of converting text with text, floats, integers and list
     to a dictionary::
 
         >>> sorted(text_to_keyvalue('''a: Hello
@@ -166,7 +166,7 @@
 
     .. warning::
         And empty string is a valid input because empty dictionary is a valid
-        dictionary. You need to test this separately accorting
+        dictionary. You need to test this separately according
         to the circumstances.
     """
     # splitting according to universal newlines approach
@@ -345,7 +345,7 @@
                   a_is_subset=False):
     """Determine the difference of two dictionaries.
 
-    The function returns missing keys and differnt values for common keys::
+    The function returns missing keys and different values for common keys::
 
         >>> a = {'c': 2, 'b': 3, 'a': 4}
         >>> b = {'c': 1, 'b': 3, 'd': 5}
@@ -367,7 +367,7 @@
 
     Comparing to the Python ``difflib`` package this function does not create
     any difference output. It just returns the dictionaries.
-    Comapring to the Python ``unittest`` ``assertDictEqual()``,
+    Comparing to the Python ``unittest`` ``assertDictEqual()``,
     this function does not issues error or exception, it just determines
     what it the difference.
     """
@@ -482,7 +482,7 @@
     >>> check_text_ellipsis("a=11\nb=...", "a=11\nb=22\n")
     True
 
-    This function is based on regular expression containg .+ but no other
+    This function is based on regular expression containing .+ but no other
     regular expression matching will be done.
 
     >>> check_text_ellipsis("Result: [569] (...)",



More information about the grass-commit mailing list