[AI]
ГОСТ
This commit is contained in:
@@ -87,6 +87,24 @@ def test_handle_list():
|
||||
assert doc.paragraphs[0].text == "Элемент 1"
|
||||
assert doc.paragraphs[1].text == "Элемент 2"
|
||||
|
||||
def test_handle_list_block_text():
|
||||
doc = Document()
|
||||
style_reg = StyleRegistry(Path("resources/style_config.yaml"))
|
||||
node = {
|
||||
"type": "list",
|
||||
"ordered": False,
|
||||
"children": [
|
||||
{"type": "list_item", "children": [{"type": "block_text", "children": [{"type": "text", "raw": "Элемент 1"}]}]},
|
||||
{"type": "list_item", "children": [{"type": "block_text", "children": [{"type": "text", "raw": "Элемент 2"}]}]},
|
||||
]
|
||||
}
|
||||
handle_list(node, doc, Path("."), style_reg)
|
||||
|
||||
assert len(doc.paragraphs) == 2
|
||||
assert doc.paragraphs[0].style.name == "List Bullet"
|
||||
assert doc.paragraphs[0].text == "Элемент 1"
|
||||
assert doc.paragraphs[1].text == "Элемент 2"
|
||||
|
||||
|
||||
def test_handle_table():
|
||||
doc = Document()
|
||||
|
||||
Reference in New Issue
Block a user