Skip to content

Commit 0dd0018

Browse files
committed
test: add validation for extracting and exporting rich tables in test_doc_manipulation_with_rich_tables
1 parent b4ec430 commit 0dd0018

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/test_docling_doc.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1759,6 +1759,12 @@ def test_rich_tables(rich_table_doc):
17591759

17601760

17611761
def test_doc_manipulation_with_rich_tables(rich_table_doc):
1762+
rich_table = rich_table_doc.tables[0]
1763+
extracted_doc = rich_table_doc.extract_items_range(start=rich_table, end=rich_table)
1764+
extracted_md = extracted_doc.export_to_markdown()
1765+
assert len(extracted_md) > 0
1766+
assert len(extracted_doc.tables) == 2
1767+
17621768
rich_table_doc.delete_items(node_items=[rich_table_doc.texts[0]])
17631769

17641770
exp_file = Path("test/data/doc/rich_table_post_text_del.out.yaml")

0 commit comments

Comments
 (0)