Skip to content

Commit 1520e4d

Browse files
author
Jason Ward
committed
refs #51: Added a document fixture that is missing the styles.xml file and a test showing its expected output.
1 parent f6935e7 commit 1520e4d

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

pydocx/fixtures/missing_style.docx

2.58 KB
Binary file not shown.

pydocx/tests/test_docx.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,19 @@ def test_justification():
722722
''')
723723

724724

725+
def test_missing_style():
726+
file_path = path.join(
727+
path.abspath(path.dirname(__file__)),
728+
'..',
729+
'fixtures',
730+
'missing_style.docx',
731+
)
732+
actual_html = convert(file_path)
733+
assert_html_equal(actual_html, BASE_HTML % '''
734+
<p>AAA</p>
735+
''')
736+
737+
725738
def _converter(*args, **kwargs):
726739
# Having a converter that does nothing is the same as if abiword fails to
727740
# convert.

0 commit comments

Comments
 (0)