execute.py 文件源码

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

项目:ave 作者: sonyxperiadev 项目源码 文件源码
def t12():
    pretty = '%s t12' % __file__
    print(pretty)

    w = Workspace(uid='vcsjob-execute-t12')
    jobs = make_vcsjob_tree(w)
    os.unsetenv('PATH')

    exc = None
    try:
        vcsjob.execute_tags(jobs, None, ['PATH'])
    except Exception, e:
        exc = e

    if not exc:
        print(
            'FAIL %s: vcsjob.fetch.run() with junk --env did not fail'
            % pretty
        )
        return

    # check the error message
    if not str(exc).startswith('environment variable "PATH" is not set'):
        print('FAIL %s: wrong error message: %s' % (pretty, str(exc)))
        return

    w.delete()

# check that correct value is returned by vcsjob.execute_single()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号