summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xselftest/format-subunit4
1 files changed, 3 insertions, 1 deletions
diff --git a/selftest/format-subunit b/selftest/format-subunit
index 71fa018bae..3747082839 100755
--- a/selftest/format-subunit
+++ b/selftest/format-subunit
@@ -79,7 +79,7 @@ class PlainFormatter(object):
if result in ("success", "xfail"):
self.suites_ok+=1
else:
- self.output_msg("ERROR: Testsuite[%s]\nREASON: %s\n" % (name, reason))
+ self.output_msg("ERROR: Testsuite[%s]\nREASON: %s\n" % (name, reason or ''))
self.suitesfailed.append(name)
if self.immediate and not self.verbose:
out += self.test_output[name]
@@ -107,6 +107,8 @@ class PlainFormatter(object):
'success': '.'}.get(result, "?(%s)" % result))
return
+ if reason is None:
+ reason = ''
reason = reason.strip()
self.test_output[self.name] += "UNEXPECTED(%s): %s\nREASON: %s\n" % (result, testname, reason)