diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-05-20 19:46:23 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-05-20 19:46:23 +0100 |
| commit | 97162dd1dbf804f633f8e2c7c508f6e7bebee72d (patch) | |
| tree | 42ad9951e6ded609ea9292748047a5f7dda1fe7b /tests/docx | |
| parent | 511ec18001add7f543ca892aef6a61c1af3c7c55 (diff) | |
Simplify _read_document_xml_element()
Diffstat (limited to 'tests/docx')
| -rw-r--r-- | tests/docx/body_xml_tests.py | 8 |
1 files changed, 3 insertions, 5 deletions
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): |
