Skip to content

Commit f243f14

Browse files
author
Thomas Preud'homme
committed
[LNT] Python 3 support: adapt regex for div by 0 msg
Summary: Test server/ui/V4Pages.py checks that the /explode page leads to a division by zero exception message. However the exception message has changed between Python 2 and Python 3 so this commit adapts the regex to catch both texts. Reviewers: cmatthews, hubert.reinterpretcast, kristof.beyls, leandron, PrzemekWirkus Reviewed By: cmatthews Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D68988
1 parent de6c3f8 commit f243f14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/server/ui/V4Pages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ def main():
636636
check_json(client, '/db_default/v4/nts/graph?switch_min_mean=yes&plot.0=1.3.2&json=true')
637637
app.testing = False
638638
error_page = check_html(client, '/explode', expected_code=500)
639-
assert "integer division or modulo by zero" in error_page.data
639+
assert re.search("division (or modulo )?by zero", error_page.data)
640640

641641
error_page = check_html(client, '/gone', expected_code=404)
642642
assert "test" in error_page.data

0 commit comments

Comments
 (0)