[GRASS-SVN] r61644 - in grass/trunk/lib/python/pygrass/modules/interface: . testsuite

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Aug 15 03:22:56 PDT 2014


Author: zarch
Date: 2014-08-15 03:22:55 -0700 (Fri, 15 Aug 2014)
New Revision: 61644

Modified:
   grass/trunk/lib/python/pygrass/modules/interface/parameter.py
   grass/trunk/lib/python/pygrass/modules/interface/testsuite/test_parameter.py
Log:
pygrass: revert r61587

Modified: grass/trunk/lib/python/pygrass/modules/interface/parameter.py
===================================================================
--- grass/trunk/lib/python/pygrass/modules/interface/parameter.py	2014-08-15 00:03:13 UTC (rev 61643)
+++ grass/trunk/lib/python/pygrass/modules/interface/parameter.py	2014-08-15 10:22:55 UTC (rev 61644)
@@ -209,8 +209,7 @@
                               if isinstance(val, tuple) else str(val)
                               for val in self.rawvalue])
         else:
-            value = (repr(self.rawvalue) if self.typedesc == "string"
-                     else str(self.rawvalue))
+            value = str(self.rawvalue)
         return "%s=%s" % (self.name, value)
 
     def get_python(self):

Modified: grass/trunk/lib/python/pygrass/modules/interface/testsuite/test_parameter.py
===================================================================
--- grass/trunk/lib/python/pygrass/modules/interface/testsuite/test_parameter.py	2014-08-15 00:03:13 UTC (rev 61643)
+++ grass/trunk/lib/python/pygrass/modules/interface/testsuite/test_parameter.py	2014-08-15 10:22:55 UTC (rev 61644)
@@ -309,7 +309,7 @@
         # set private attributes to skip the check function
         param._value = 'elev'
         param._rawvalue = 'elev'
-        self.assertEqual("rast='elev'", param.get_bash())
+        self.assertEqual("rast=elev", param.get_bash())
 
     def test_multiple_strings(self):
         param = Parameter(diz=dict(name='rast', required='yes',
@@ -320,7 +320,7 @@
         self.assertEqual("rast=elev,asp,slp", param.get_bash())
         param._value = ['elev', ]
         param._rawvalue = 'elev'
-        self.assertEqual("rast='elev'", param.get_bash())
+        self.assertEqual("rast=elev", param.get_bash())
 
     def test_keydescvalues(self):
         param = Parameter(diz=dict(name='range', required='yes',



More information about the grass-commit mailing list