common_functions.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:Zeuz_Python_Node 作者: AutomationSolutionz 项目源码 文件源码
def step_exit(data_set):
    ''' Exits a Test Step wtih passed/failed in the standard format, when the user specifies it in the step data '''

    sModuleInfo = inspect.stack()[0][3] + " : " + inspect.getmoduleinfo(__file__).name
    CommonUtil.ExecLog(sModuleInfo,"Function Start", 0)

    try:
        action_value = ''
        for row in data_set:
            if row[0] == 'step exit' and row[1] == 'action':
                action_value = row[2]
    except:
        return CommonUtil.Exception_Handler(sys.exc_info())

    if action_value in failed_tag_list: # Convert user specified pass/fail into standard result
        return 'failed'
    elif action_value in skipped_tag_list:
        return 'skipped'
    elif action_value in passed_tag_list:
        return 'passed'
    else:
        CommonUtil.ExecLog(sModuleInfo, "Step Result action has invalid VALUE", 3)
        return 'failed'
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号