(path: Path, pages: list[str])
| 18 | |
| 19 | |
| 20 | def write_test_pdf(path: Path, pages: list[str]) -> None: |
| 21 | if fitz is None: |
| 22 | pytest.skip("PyMuPDF is required for PDF source extraction tests.") |
| 23 | doc = fitz.open() |
| 24 | try: |
| 25 | for text in pages: |
| 26 | page = doc.new_page() |
| 27 | page.insert_text((72, 72), text) |
| 28 | doc.save(path) |
| 29 | finally: |
| 30 | doc.close() |
| 31 | |
| 32 | |
| 33 | def run_extract_source(input_path: Path, output_path: Path, *extra: str) -> dict: |
no test coverage detected