From 150a47e415a72cf43b06b024faf8ea7aee0ab281 Mon Sep 17 00:00:00 2001 From: Jonathan Lange Date: Thu, 19 Jun 2008 10:55:24 +1000 Subject: Split tracebacks by *line* rather than by any whitespace. --- python/subunit/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'python/subunit/__init__.py') diff --git a/python/subunit/__init__.py b/python/subunit/__init__.py index 5ee25d1..f52dbaa 100644 --- a/python/subunit/__init__.py +++ b/python/subunit/__init__.py @@ -215,14 +215,14 @@ class TestProtocolClient(unittest.TestResult): def addError(self, test, error): """Report an error in test test.""" self._stream.write("error: %s [\n" % test.id()) - for line in self._exc_info_to_string(error, test).split(): + for line in self._exc_info_to_string(error, test).splitlines(): self._stream.write("%s\n" % line) self._stream.write("]\n") def addFailure(self, test, error): """Report a failure in test test.""" self._stream.write("failure: %s [\n" % test.id()) - for line in self._exc_info_to_string(error, test).split(): + for line in self._exc_info_to_string(error, test).splitlines(): self._stream.write("%s\n" % line) self._stream.write("]\n") -- cgit v1.2.1