summaryrefslogtreecommitdiff
path: root/tests/docx/xmlparser_tests.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2026-12-05 19:29:10 +0000
committerMichael Williamson <mike@zwobble.org>2026-12-05 19:29:10 +0000
commit414cb49cd08d4952cf5eff51bd9e2da811c4661b (patch)
treeb237b5f402d7f7f5f80c6c93bc1c3415e9cfe146 /tests/docx/xmlparser_tests.py
parent3646167ab5685ea5a69de24442cf46e963bf7f41 (diff)
Revert "Handle XML documents that are missing a root element"
This reverts commit 659c4ffe6ade2d8132873ae3f3f3a22df38fdb37.
Diffstat (limited to 'tests/docx/xmlparser_tests.py')
-rw-r--r--tests/docx/xmlparser_tests.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/tests/docx/xmlparser_tests.py b/tests/docx/xmlparser_tests.py
index 65479fc..75fc35a 100644
--- a/tests/docx/xmlparser_tests.py
+++ b/tests/docx/xmlparser_tests.py
@@ -2,7 +2,7 @@ import io
import pytest
-from mammoth.docx.xmlparser import parse_xml, element as xml_element, text as xml_text, NoRootElementError
+from mammoth.docx.xmlparser import parse_xml, element as xml_element, text as xml_text
from ..testing import assert_equal
@@ -60,13 +60,6 @@ def test_error_if_xml_is_badly_formed():
pytest.raises(Exception, lambda: _parse_xml_string(b'<bo'))
-def test_when_document_is_missing_root_element_then_error_is_raised():
- pytest.raises(
- NoRootElementError,
- lambda: _parse_xml_string(b'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'),
- )
-
-
class FindChildTests(object):
def test_returns_none_if_no_children(self):
xml = xml_element("a")