def test_vba(self, datadir, Manifest):
    datadir.chdir()
    from openpyxl import load_workbook
    wb = load_workbook('sample.xlsm', keep_vba=True)
    manifest = Manifest()
    manifest._write_vba(wb)
    partnames = set([t.PartName for t in manifest.Override])
    expected = set(['/xl/workbook.xml', '/xl/worksheets/sheet1.xml', '/xl/worksheets/sheet2.xml', '/xl/worksheets/sheet3.xml', '/xl/theme/theme1.xml', '/xl/styles.xml', '/docProps/core.xml', '/docProps/app.xml'])
    assert (partnames == expected)
def test_vba(self, datadir, Manifest):
    datadir.chdir()
    from openpyxl import load_workbook
    wb = load_workbook('sample.xlsm', keep_vba=True)
    manifest = Manifest()
    manifest._write_vba(wb)
    partnames = set([t.PartName for t in manifest.Override])
    expected = set(['/xl/workbook.xml', '/xl/worksheets/sheet1.xml', '/xl/worksheets/sheet2.xml', '/xl/worksheets/sheet3.xml', '/xl/theme/theme1.xml', '/xl/styles.xml', '/docProps/core.xml', '/docProps/app.xml'])
    assert (partnames == expected)