MCPcopy
hub / github.com/langroid/langroid / test_markitdown_xls_parser

Function test_markitdown_xls_parser

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

Source from the content-addressed store, hash-verified

9
10
11def test_markitdown_xls_parser():
12 current_dir = os.path.dirname(os.path.abspath(__file__))
13 tests_root = os.path.abspath(os.path.join(current_dir, ".."))
14
15 path1 = os.path.join(tests_root, "main", "data", "sample.xlsx")
16
17 # Test XLS parsing
18 xls_parser = DocumentParser.create(
19 path1,
20 ParsingConfig(
21 n_neighbor_ids=2,
22 xls=MarkitdownXLSParsingConfig(),
23 ),
24 )
25 doc_xls = xls_parser.get_doc()
26 assert isinstance(doc_xls.content, str)
27 assert len(doc_xls.content) > 0
28 assert doc_xls.metadata.source == path1
29
30 xls_chunks = xls_parser.get_doc_chunks()
31 assert len(xls_chunks) > 0
32 assert all(chunk.metadata.is_chunk for chunk in xls_chunks)
33 assert all(path1 in chunk.metadata.source for chunk in xls_chunks)
34
35
36def test_markitdown_pptx_parser():

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…