aboutsummaryrefslogtreecommitdiff
path: root/tests/docx/body_xml_tests.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2023-05-20 19:54:13 +0100
committerMichael Williamson <mike@zwobble.org>2023-05-20 19:54:13 +0100
commit764885cdd67087cbb93cf73641a2357ecc562606 (patch)
tree00c4bd3111e03f233dd75fc3a465f3027beb2382 /tests/docx/body_xml_tests.py
parent60c62e4fe17e42b9732816344c78b6a68f9b6c7f (diff)
Support reading multiple elements in tests
Diffstat (limited to 'tests/docx/body_xml_tests.py')
-rw-r--r--tests/docx/body_xml_tests.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/docx/body_xml_tests.py b/tests/docx/body_xml_tests.py
index 2459f4a..1b02b97 100644
--- a/tests/docx/body_xml_tests.py
+++ b/tests/docx/body_xml_tests.py
@@ -1183,8 +1183,11 @@ def _read_and_get_document_xml_element(element, **kwargs):
def _read_and_get_document_xml_elements(element, **kwargs):
+ if not isinstance(element, list):
+ element = [element]
+
reader = _create_body_reader(**kwargs)
- result = reader.read_all([element])
+ result = reader.read_all(element)
assert_equal([], result.messages)
return result.value