def test_add_image(Worksheet): from openpyxl.drawing.image import Image from PIL.Image import Image as PILImage ws = Worksheet(DummyWorkbook()) im = Image(PILImage()) ws.add_image(im, "D5")
def test_check_anchor_image(datadir): datadir.chdir() from ..spreadsheet_drawing import _check_anchor from PIL.Image import Image as PILImage im = Image(PILImage()) anc = _check_anchor(im) assert anc._from.row == 0 assert anc._from.col == 0 assert anc.ext.height == 0 assert anc.ext.width == 0