system-test: Fix crash when a comparison with a non-string value fails

`orig` isn't necessarily a string, so the string concatenation here can
raise a TypeError.
This commit is contained in:
Ryan Gonzalez
2025-09-19 16:02:13 -05:00
parent d3bed7830c
commit 29ac9c1919

View File

@@ -517,7 +517,7 @@ class BaseTest(object):
if gold != output: if gold != output:
diff = "".join(difflib.unified_diff( diff = "".join(difflib.unified_diff(
[l + "\n" for l in gold.split("\n")], [l + "\n" for l in output.split("\n")])) [l + "\n" for l in gold.split("\n")], [l + "\n" for l in output.split("\n")]))
raise Exception("content doesn't match:\n" + diff + "\n\nOutput:\n" + orig + "\n") raise Exception(f"content doesn't match:\n{diff}\n\nOutput:\n{orig}\n")
check = check_output check = check_output