mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-11 03:11:50 +00:00
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:
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user