zoukankan      html  css  js  c++  java
  • RF内置库函数学习(一)

    Builtin库(固定库)

    evaluate(求值)求表达式的值并返回结果。

    Arguments:

    [ expression | modules=None | namespace=None ]

    Evaluates the given expression in Python and returns the results.

    expression is evaluated in Python as explained in `Evaluating expressions`.

     

    modules argument can be used to specify a comma separated list of Python modules to be imported and added to the evaluation namespace.

    Modules 参数用来指定是从python的哪个模块导入,并增加到namespace。即在调用python的函数时,在此指明函数所在的模块。

    释义:返回一个随机数。调用了random模块,sys模块。此处modules可以不写。

          Maxint sys中的最大整数值。即在0和最大整数值间随机一个数。

    namespace argument can be used to pass a custom evaluation namespace as a dictionary. Possible modules are added to this namespace. This is a new feature in Robot Framework 2.8.4.

    namespace 用来指定自定义的词典。即指明表达式计算的时候,变量值从那个自定义的区间去取。Namespace单词必须写。

     

    释义:创建一个${ns}的词典,调用词典中的x,y并将计算结果给result。

  • 相关阅读:
    python读取 ini 配置文件
    Mysql 存储过程声明及使用
    PAT乙级1002
    Pat乙级1001
    第四届蓝桥杯省赛翻硬币
    蓝桥杯第四届省赛错误票据
    蓝桥杯第四届省赛前缀判断
    蓝桥杯第四届省赛第39级台阶
    蓝桥杯第四届省赛马虎的算式
    蓝桥杯第三届省赛试题取球游戏
  • 原文地址:https://www.cnblogs.com/morwind/p/6672029.html
Copyright © 2011-2022 走看看