openqa_review.py 文件源码

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

项目:openqa_review 作者: okurz 项目源码 文件源码
def get_results_by_bugref(results, args):
    include_tags = ['STILL_FAILING', 'NEW_ISSUE']
    if args.include_softfails:
        include_tags += soft_fail_states

    # plain for-loop with append is most efficient: https://stackoverflow.com/questions/11276473/append-to-a-dict-of-lists-with-a-dict-comprehension
    results_by_bugref = defaultdict(list)
    for k, v in iteritems(results):
        if not re.match('(' + '|'.join(include_tags) + ')', v['state']):
            continue
        key = v['bugref'] if (args.bugrefs and 'bugref' in v and v['bugref']) else 'todo'
        results_by_bugref[key].append(dict(v, **{'name': k}))
    return results_by_bugref
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号