test_external.py 文件源码

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

项目:org-chart-builder 作者: Hitachi-Data-Systems 项目源码 文件源码
def test_write_workbook(datadir, tmpdir):
    datadir.chdir()
    src = ZipFile("book1.xlsx")
    orig_files = set(src.namelist())
    src.close()

    from openpyxl import load_workbook
    wb = load_workbook("book1.xlsx")
    tmpdir.chdir()
    wb.save("book1.xlsx")

    src = ZipFile("book1.xlsx")
    out_files = set(src.namelist())
    src.close()
    # remove files from archive that the other can't have
    out_files.discard("xl/sharedStrings.xml")
    orig_files.discard("xl/calcChain.xml")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号