feat: export editable named Word styles and release 0.5.0
This commit is contained in:
@@ -40,6 +40,8 @@ def test_word_page_settings_and_inline_styles(tmp_path, engine):
|
||||
style_rules={"paragraph": {"font_size": 14, "font_size_unit": "pt"}})
|
||||
with zipfile.ZipFile(path) as package:
|
||||
doc = etree.fromstring(package.read("word/document.xml"))
|
||||
from docx_assertions import effective_document
|
||||
doc = effective_document(doc, etree.fromstring(package.read('word/styles.xml')))
|
||||
ns = {"w": "http://schemas.openxmlformats.org/wordprocessingml/2006/main"}
|
||||
assert doc.xpath("//w:pgSz/@w:orient", namespaces=ns) == ["landscape"]
|
||||
assert int(doc.xpath("//w:pgSz/@w:w", namespaces=ns)[0]) > int(doc.xpath("//w:pgSz/@w:h", namespaces=ns)[0])
|
||||
|
||||
Reference in New Issue
Block a user