main.py 文件源码

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

项目:GSM-scanner 作者: yosriayed 项目源码 文件源码
def pytest_runtestloop(session):
    if session.config.option.collectonly:
        return True

    def getnextitem(i):
        # this is a function to avoid python2
        # keeping sys.exc_info set when calling into a test
        # python2 keeps sys.exc_info till the frame is left
        try:
            return session.items[i+1]
        except IndexError:
            return None

    for i, item in enumerate(session.items):
        nextitem = getnextitem(i)
        item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
        if session.shouldstop:
            raise session.Interrupted(session.shouldstop)
    return True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号