detect_type_test.py 文件源码

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

项目:gransk 作者: pcbje 项目源码 文件源码
def _run_test(self, filename):
    mock_pipeline = test_helper.get_mock_pipeline([
        helper.DOCUMENT, helper.PICTURE,
        helper.ARCHIVE, helper.DISKIMAGE])

    detector = detect_type.Subscriber(mock_pipeline)

    with open('config.yml') as inp:
      detector.setup(yaml.load(inp.read()))

    doc = document.get_document(filename)

    detector.consume(doc, StringIO('dummy'))

    return doc
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号