Tests/RunCMake/FileAPI: Improve error on unexpected line numbers

This commit is contained in:
Brad King
2024-12-06 17:24:19 -05:00
parent bed97ced45
commit 200efab4d4
2 changed files with 2 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ import re
if sys.version_info[0] >= 3:
unicode = str
long = int
def is_bool(x, val=None):
return isinstance(x, bool) and (val is None or x == val)

View File

@@ -24,7 +24,7 @@ def check_backtrace(t, b, backtrace):
if expected["line"] is not None:
expected_keys.append("line")
assert is_int(node["line"], expected["line"])
assert is_int(node["line"], expected["line"]), repr(node["line"]) + " != " + repr(expected["line"])
if expected["command"] is not None:
expected_keys.append("command")