Skip to content

Commit

Permalink
Refactor PptxDocumentHandler to yield Page objects with slide number
Browse files Browse the repository at this point in the history
  • Loading branch information
davidedigrande committed Jan 28, 2024
1 parent ef5a155 commit f781531
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/core/test_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ def get_pptx_document(tmp_path, pptx_text):
document = pptx.Presentation()
document.slides.add_slide(document.slide_layouts[0])
document.slides[0].shapes.title.text = pptx_text
document.slides[0].shapes.add_textbox(0, 0, 100, 100).text = pptx_text
document.slides.add_slide(document.slide_layouts[0])
document.slides[1].shapes.add_textbox(0, 0, 100, 100).text = pptx_text
path = tmp_path / "test_document.pptx"
document.save(path)
return LocalDocument.from_path(path)


def test_pptx(tmp_path):
pptx_text = "ragna is neat!"
tmp_pptx_document = get_pptx_document(tmp_path, pptx_text)
Expand Down

0 comments on commit f781531

Please sign in to comment.