コード例 #1
0
ファイル: BuiltIn.py プロジェクト: zbzzbd/rbot_srcCode_copy
 def _verity_values_for_set_variable_if(self,values,default=False):
     if not values:
         if default:
             return [None]
         raise RuntimeError('At least one value is required')
     if is_list_var(values[0]):
         values[:1] =[utils.escape(item) for item in
                      self._variables[values[0]]]
         return self._verity_values_for_set_variable_if(values)
     return values
コード例 #2
0
 def _replace_list_until(self, items, replace_until, ignore_errors):
     # @{list} variables can contain more or less arguments than needed.
     # Therefore we need to go through items one by one, and escape possible
     # extra items we got.
     replaced = []
     while len(replaced) < replace_until and items:
         replaced.extend(self._replace_list([items.pop(0)], ignore_errors))
     if len(replaced) > replace_until:
         replaced[replace_until:] = [escape(item) for item in replaced[replace_until:]]
     return replaced + items
コード例 #3
0
 def _replace_list_until(self, items, replace_until, ignore_errors):
     # @{list} variables can contain more or less arguments than needed.
     # Therefore we need to go through items one by one, and escape possible
     # extra items we got.
     replaced = []
     while len(replaced) < replace_until and items:
         replaced.extend(self._replace_list([items.pop(0)], ignore_errors))
     if len(replaced) > replace_until:
         replaced[replace_until:] = [escape(item)
                                     for item in replaced[replace_until:]]
     return replaced + items
 def replace_from_beginning(self, how_many, args):
     # There might be @{list} variables and those might have more or less
     # arguments that is needed. Therefore we need to go through arguments
     # one by one.
     processed = []
     while len(processed) < how_many and args:
         processed += self.current.replace_list([args.pop(0)])
     # In case @{list} variable is unpacked, the arguments going further
     # needs to be escaped, otherwise those are unescaped twice.
     processed[how_many:] = [utils.escape(arg) for arg in processed[how_many:]]
     return processed + args
コード例 #5
0
 def replace_from_beginning(self, how_many, args):
     # There might be @{list} variables and those might have more or less
     # arguments that is needed. Therefore we need to go through arguments
     # one by one.
     processed = []
     while len(processed) < how_many and args:
         processed += self.current.replace_list([args.pop(0)])
     # In case @{list} variable is unpacked, the arguments going further
     # needs to be escaped, otherwise those are unescaped twice.
     processed[how_many:] = [
         utils.escape(arg) for arg in processed[how_many:]
     ]
     return processed + args
コード例 #6
0
ファイル: settings.py プロジェクト: DiggerPlus/robotframework
 def _escape_as_data(self, value):
     return utils.escape(value)
コード例 #7
0
ファイル: settings.py プロジェクト: atthaboon/RIDE
 def _escape(self, value):
     return utils.escape(value)
コード例 #8
0
 def _escape_doc(self, value):
     return escape(value)
コード例 #9
0
ファイル: settings.py プロジェクト: qianpeng-qp/pytest1
 def _escape_as_data(self, value):
     return escape(value)
コード例 #10
0
 def _escape_as_data(self, value):
     return utils.escape(value)
コード例 #11
0
ファイル: settings.py プロジェクト: alexandrul/robotframework
 def _escape_as_data(self, value):
     return escape(value)
コード例 #12
0
ファイル: variables.py プロジェクト: 3DSo/robotframework
 def _escape(self, item):
     item = utils.escape(item)
     # Escape also special syntax used by Run Kw If and Run Kws.
     if item in ('ELSE', 'ELSE IF', 'AND'):
         item = '\\' + item
     return item
コード例 #13
0
 def _escape(self, item):
     item = utils.escape(item)
     # Escape also special syntax used by Run Kw If and Run Kws.
     if item in ('ELSE', 'ELSE IF', 'AND'):
         item = '\\' + item
     return item
コード例 #14
0
 def _escape(self, value):
     return utils.escape(value)
コード例 #15
0
 def _escape(self, item):
     item = utils.escape(item)
     # Escape also special syntax used by Run Kw If and Run Kws.
     if item in ("ELSE", "ELSE IF", "AND"):
         item = "\\" + item
     return item