Example #1
0
 def assign(self, context, return_value):
     context.trace('Return: %s' % utils.safe_repr(return_value))
     if not (self.scalar_vars or self.list_var):
         return
     for name, value in self._get_vars_to_set(return_value):
         context.get_current_vars()[name] = value
         context.output.info(utils.format_assign_message(name, value))
Example #2
0
 def assign(self, context, return_value):
     context.trace('Return: %s' % utils.safe_repr(return_value))
     if not (self.scalar_vars or self.list_var):
         return
     for name, value in self._get_vars_to_set(return_value):
         context.get_current_vars()[name] = value
         context.output.info(utils.format_assign_message(name, value))
 def assign(self, context, return_value):
     self.validate_assignment()
     context.trace(lambda: 'Return: %s' % prepr(return_value))
     resolver = ReturnValueResolver(self.assignment)
     for name, value in resolver.resolve(return_value):
         if not self._extended_assign(name, value, context.variables):
             value = self._normal_assign(name, value, context.variables)
         context.info(format_assign_message(name, value))
Example #4
0
 def assign(self, return_value):
     context = self._context
     context.trace(lambda: 'Return: %s' % prepr(return_value))
     resolver = ReturnValueResolver(self._assignment)
     for name, value in resolver.resolve(return_value):
         if not self._extended_assign(name, value, context.variables):
             value = self._normal_assign(name, value, context.variables)
         context.info(format_assign_message(name, value))
Example #5
0
 def _run_one_round(self, data, values):
     variables = self._map_variables_and_values(data.variables, values)
     for name, value in variables:
         self._context.variables[name] = value
     name = ', '.join(format_assign_message(n, v) for n, v in variables)
     result = KeywordResult(kwname=name, type=data.FOR_ITEM_TYPE)
     runner = StepRunner(self._context, self._templated)
     with StatusReporter(self._context, result):
         runner.run_steps(data.keywords)
Example #6
0
 def _run_one_round(self, data, values):
     name = ', '.join(
         format_assign_message(var, item)
         for var, item in zip(data.variables, values))
     result = KeywordResult(kwname=name, type=data.FOR_ITEM_TYPE)
     for var, value in zip(data.variables, values):
         self._context.variables[var] = value
     runner = KeywordRunner(self._context, self._templated)
     with StatusReporter(self._context, result):
         runner.run_keywords(data.keywords)
 def _run_one_round(self, data, values):
     name = ', '.join(format_assign_message(var, item)
                      for var, item in zip(data.variables, values))
     result = KeywordResult(kwname=name,
                            type=data.FOR_ITEM_TYPE)
     for var, value in zip(data.variables, values):
         self._context.variables[var] = value
     runner = StepRunner(self._context, self._templated)
     with StatusReporter(self._context, result):
         runner.run_steps(data.keywords)
 def _run_one_round(self, values, data, result):
     variables = self._map_variables_and_values(data.variables, values)
     for name, value in variables:
         self._context.variables[name] = value
     info = ', '.join(format_assign_message(n, v) for n, v in variables)
     result = result.body.create_iteration(info=info,
                                           lineno=data.lineno,
                                           source=data.source)
     runner = BodyRunner(self._context, templated=self._templated)
     with StatusReporter(self._context, result):
         runner.run(data.body)
 def _run_one_round(self, data, values):
     name = ', '.join(format_assign_message(var, item)
                      for var, item in zip(data.variables, values))
     result = KeywordResult(name=name,
                            type=data.FOR_ITEM_TYPE,
                            starttime=get_timestamp())
     self._context.start_keyword(result)
     for var, value in zip(data.variables, values):
         self._context.variables[var] = value
     runner = KeywordRunner(self._context, self._templated)
     error = self._run_with_error_handling(runner.run_keywords, data.keywords)
     result.status = self._get_status(error)
     result.endtime = get_timestamp()
     self._context.end_keyword(result)
     return error
Example #10
0
 def log_variables(self,level='INFO'):
     variables = self.get_variable()
     for name in sorted(variables.keys(),key=lambda s: s.lower()):
         msg = utils.format_assign_message(name,variables[name],
                                      cut_long=False)
         self.log(msg,level)
Example #11
0
 def __init__(self, vars, items):
     name = ', '.join(format_assign_message(var, item)
                      for var, item in zip(vars, items))
     BaseKeyword.__init__(self, name, type='foritem')
     self.starttime = get_timestamp()
Example #12
0
 def __init__(self, vars, items):
     name = ', '.join(
         format_assign_message(var, item) for var, item in zip(vars, items))
     _BaseKeyword.__init__(self, name, type='foritem')
     self.starttime = get_timestamp()
Example #13
0
 def _log_set_variable(self,name,value):
     self.log(utils.format_assign_message(name,value))
Example #14
0
 def assign(self, context, return_value):
     context.trace(lambda: 'Return: %s' % prepr(return_value))
     for name, value in self._return_resolver.resolve(return_value):
         if not self._extended_assign(name, value, context.variables):
             value = self._normal_assign(name, value, context.variables)
         context.info(format_assign_message(name, value))
Example #15
0
 def _assign(self, context, return_value):
     for name, value in return_value.get_variables_to_set():
         if not self._extended_assign(name, value, context.variables):
             self._normal_assign(name, value, context.variables)
         context.info(format_assign_message(name, value))
Example #16
0
 def _assign(self, context, return_value):
     for name, value in return_value.get_variables_to_set():
         if not self._extended_assign(name, value, context.variables):
             self._normal_assign(name, value, context.variables)
         context.info(format_assign_message(name, value))