From 2db5888df5751d8432af97e9dfc26e91ded950fa Mon Sep 17 00:00:00 2001 From: Rafael Zalamena Date: Tue, 19 Sep 2017 17:05:07 -0300 Subject: [PATCH] topotest: json_cmp_result split error lines When the API user wanted to show newlines we have to break them manually to get the propper format. --- tests/topotests/lib/topotest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/topotests/lib/topotest.py b/tests/topotests/lib/topotest.py index 8063598eba..5dbef7432f 100644 --- a/tests/topotests/lib/topotest.py +++ b/tests/topotests/lib/topotest.py @@ -51,7 +51,8 @@ class json_cmp_result(object): def add_error(self, error): "Append error message to the result" - self.errors.append(error) + for line in error.splitlines(): + self.errors.append(line) def has_errors(self): "Returns True if there were errors, otherwise False." -- 2.39.5