bdd: be more verbose on HTML parsing error

This commit is contained in:
Sarah Hoffmann 2024-02-16 16:40:24 +01:00
parent 1e0025b095
commit ca6e65fff1

View File

@ -243,7 +243,7 @@ def step_impl(context, fmt):
try:
tree = ET.fromstring(context.response.page)
except Exception as ex:
assert False, f"Could not parse page:\n{context.response.page}"
assert False, f"Could not parse page: {ex}\n{context.response.page}"
assert tree.tag == 'html'
body = tree.find('./body')