mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
bdd: be more verbose on HTML parsing error
This commit is contained in:
@@ -243,7 +243,7 @@ def step_impl(context, fmt):
|
|||||||
try:
|
try:
|
||||||
tree = ET.fromstring(context.response.page)
|
tree = ET.fromstring(context.response.page)
|
||||||
except Exception as ex:
|
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'
|
assert tree.tag == 'html'
|
||||||
body = tree.find('./body')
|
body = tree.find('./body')
|
||||||
|
|||||||
Reference in New Issue
Block a user