@pytest.mark.pil_required
def test_write_images(datadir, ExcelWriter, archive):
    from openpyxl.drawing.image import Image
    datadir.chdir()
    writer = ExcelWriter(None, archive)
    img = Image('plain.png')
    writer._images.append(img)
    writer._write_images()
    archive.close()
    zipinfo = archive.infolist()
    assert ('xl/media/image1.png' in archive.namelist())
@pytest.mark.pil_required
def test_write_images(datadir, ExcelWriter, archive):
    from openpyxl.drawing.image import Image
    datadir.chdir()
    writer = ExcelWriter(None, archive)
    img = Image('plain.png')
    writer._images.append(img)
    writer._write_images()
    archive.close()
    zipinfo = archive.infolist()
    assert ('xl/media/image1.png' in archive.namelist())