check_rendering.py 文件源码

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

项目:snovault 作者: ENCODE-DCC 项目源码 文件源码
def run(testapp, collections=None):
    app = testapp.app
    root = app.root_factory(app)
    if not collections:
        collections = root.by_item_type.keys()
        check_path(testapp, '/')
    for collection_name in collections:
        collection = root[collection_name]
        collection_path = resource_path(collection, '')
        check_path(testapp, collection_path)
        failed = 0
        for count, item in enumerate(itervalues(collection)):
            path = resource_path(item, '')
            if not check_path(testapp, path):
                failed += 1
        if failed:
            logger.info('Collection %s: %d of %d failed to render.',
                collection_path, failed, count)
        else:
            logger.info('Collection %s: all %d rendered ok',
                collection_path, count)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号