()
| 34 | |
| 35 | |
| 36 | def test_markitdown_pptx_parser(): |
| 37 | current_dir = os.path.dirname(os.path.abspath(__file__)) |
| 38 | tests_root = os.path.abspath(os.path.join(current_dir, "..")) |
| 39 | |
| 40 | path = os.path.join(tests_root, "main", "data", "sample.pptx") |
| 41 | |
| 42 | # Test PPTX parsing |
| 43 | pptx_parser = DocumentParser.create( |
| 44 | path, |
| 45 | ParsingConfig( |
| 46 | n_neighbor_ids=2, |
| 47 | pptx=MarkitdownPPTXParsingConfig(), |
| 48 | ), |
| 49 | ) |
| 50 | doc_pptx = pptx_parser.get_doc() |
| 51 | assert isinstance(doc_pptx.content, str) |
| 52 | assert len(doc_pptx.content) > 0 |
| 53 | assert doc_pptx.metadata.source == path |
| 54 | |
| 55 | pptx_chunks = pptx_parser.get_doc_chunks() |
| 56 | assert len(pptx_chunks) > 0 |
| 57 | assert all(chunk.metadata.is_chunk for chunk in pptx_chunks) |
| 58 | assert all(path in chunk.metadata.source for chunk in pptx_chunks) |
nothing calls this directly
no test coverage detected
searching dependent graphs…