tests: make test_facture_pdf oblivious to formatting (#85632)

This commit is contained in:
Benjamin Dauvergne 2024-01-14 11:15:55 +01:00
parent e04a648243
commit b62fa2b3b5
1 changed files with 4 additions and 1 deletions

View File

@ -221,9 +221,12 @@ def test_facture_pdf(app):
)
def helper(root):
def simplify(s):
return '\n'.join(map(str.strip, s.splitlines()))
tag = root.tag.split('}')[-1]
if len(root) == 0:
return [tag, root.text or '']
return [tag, simplify(root.text or '')]
else:
return [tag] + [helper(node) for node in root]