test_issue39_unquoted.py 文件源码

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

项目:segno 作者: heuer 项目源码 文件源码
def test_output2():
    out = io.BytesIO()
    segno.make_qr('Good Times', error='M').save(out, kind='png', scale=10, color='red')
    f = tempfile.NamedTemporaryFile('w', suffix='.png', delete=False)
    f.close()
    cli.main(['-e=M', '--scale=10', '--color=red', '--output={0}'.format(f.name), 'Good', 'Times'])
    f = open(f.name, 'rb')
    content = f.read()
    f.close()
    os.unlink(f.name)
    assert out.getvalue() == content
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号