From 97162dd1dbf804f633f8e2c7c508f6e7bebee72d Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 20 May 2023 19:46:23 +0100 Subject: Simplify _read_document_xml_element() --- tests/docx/body_xml_tests.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'tests/docx') diff --git a/tests/docx/body_xml_tests.py b/tests/docx/body_xml_tests.py index 2a2454d..badd5b8 100644 --- a/tests/docx/body_xml_tests.py +++ b/tests/docx/body_xml_tests.py @@ -1199,11 +1199,9 @@ def _read_and_get_document_xml(func, *args, **kwargs): return result.value -def _read_document_xml_element(*args, **kwargs): - return _read_document_xml( - lambda reader, element: reader.read_all([element]).map(single), - *args, - **kwargs) +def _read_document_xml_element(element, **kwargs): + reader = _create_body_reader(**kwargs) + return reader.read_all([element]).map(single) def _read_document_xml(func, element, **kwargs): -- cgit v1.2.3