main_test.py 文件源码

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

项目:appbackendapi 作者: codesdk 项目源码 文件源码
def test_main(remote_resource, tmpdir, capsys):
    images_path = str(tmpdir.mkdir('images'))

    # First, pull down some test data
    zip_path = remote_resource('language/ocr_nl-images-small.zip', tmpdir)

    # Extract it to the image directory
    with zipfile.ZipFile(zip_path) as zfile:
        zfile.extractall(images_path)

    main.main(images_path, str(tmpdir.join('ocr_nl.db')))

    stdout, _ = capsys.readouterr()

    assert re.search(r'google was found with count', stdout)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号