def test_merge_vba(ExcelWriter, archive, datadir):
    from openpyxl import load_workbook
    datadir.chdir()
    wb = load_workbook('vba+comments.xlsm', keep_vba=True)
    writer = ExcelWriter(wb, archive)
    writer._merge_vba()
    assert (set(archive.namelist()) == set(['xl/vbaProject.bin', 'xl/drawings/vmlDrawing1.vml', 'xl/ctrlProps/ctrlProp3.xml', 'xl/ctrlProps/ctrlProp1.xml', 'xl/ctrlProps/ctrlProp10.xml', 'xl/ctrlProps/ctrlProp9.xml', 'xl/ctrlProps/ctrlProp4.xml', 'xl/ctrlProps/ctrlProp5.xml', 'xl/ctrlProps/ctrlProp6.xml', 'xl/ctrlProps/ctrlProp7.xml', 'xl/ctrlProps/ctrlProp8.xml', 'xl/ctrlProps/ctrlProp2.xml']))
def test_merge_vba(ExcelWriter, archive, datadir):
    from openpyxl import load_workbook
    datadir.chdir()
    wb = load_workbook('vba+comments.xlsm', keep_vba=True)
    writer = ExcelWriter(wb, archive)
    writer._merge_vba()
    assert (set(archive.namelist()) == set(['xl/vbaProject.bin', 'xl/drawings/vmlDrawing1.vml', 'xl/ctrlProps/ctrlProp3.xml', 'xl/ctrlProps/ctrlProp1.xml', 'xl/ctrlProps/ctrlProp10.xml', 'xl/ctrlProps/ctrlProp9.xml', 'xl/ctrlProps/ctrlProp4.xml', 'xl/ctrlProps/ctrlProp5.xml', 'xl/ctrlProps/ctrlProp6.xml', 'xl/ctrlProps/ctrlProp7.xml', 'xl/ctrlProps/ctrlProp8.xml', 'xl/ctrlProps/ctrlProp2.xml']))