| 9 | |
| 10 | from quantmind.preprocess.format.pdf import ( |
| 11 | PdfParseError, |
| 12 | parse_pdf, |
| 13 | pdf_to_markdown, |
| 14 | ) |
| 15 | |
| 16 | _FIXTURE = Path(__file__).resolve().parent.parent / "fixtures" / "tiny.pdf" |
| 17 | _GOLDEN = ( |
| 18 | Path(__file__).resolve().parents[2] |
| 19 | / "fixtures" |
| 20 | / "paper" |
| 21 | / "golden" |
| 22 | / "paper.pdf" |
| 23 | ) |
| 24 | |
| 25 | |
| 26 | class PdfToMarkdownTests(unittest.IsolatedAsyncioTestCase): |
| 27 | async def test_extracts_fixture_text(self): |
| 28 | pdf_bytes = _FIXTURE.read_bytes() |
| 29 | result = await pdf_to_markdown(pdf_bytes) |
| 30 | self.assertIn("QuantMind Test Fixture", result) |
| 31 | self.assertIn("plain text", result) |
| 32 |
nothing calls this directly
no outgoing calls
no test coverage detected