MCPcopy
hub / github.com/langroid/langroid / test_markitdown_pptx_parser

Function test_markitdown_pptx_parser

tests/main/test_markitdown_parser.py:36–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34
35
36def 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)

Callers

nothing calls this directly

Calls 5

ParsingConfigClass · 0.90
get_docMethod · 0.80
get_doc_chunksMethod · 0.80
createMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…