Merge lp:~radix/subunit/report-errors-better into lp:~subunit/subunit/trunk

Proposed by Robert Collins
Status: Rejected
Rejected by: Robert Collins
Proposed branch: lp:~radix/subunit/report-errors-better
Merge into: lp:~subunit/subunit/trunk
Diff against target: None lines
To merge this branch: bzr merge lp:~radix/subunit/report-errors-better
Reviewer Review Type Date Requested Status
Robert Collins Disapprove
Review via email: mp+4292@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote :

Possibly it is a bug; if it is it really should get a test to prevent it sneaking back in later. Tricksy things these bugs.

review: Needs Fixing
Revision history for this message
Robert Collins (lifeless) wrote :

Ok, I've looked into this. We use splitlines(), this strips \n's, so its appropriate to be adding them back. The reason we split is to allow escaping each line to prevent false closing ']' - even though that isn't currently hooked in :(.

So - thanks for the patch, but I won't be merging it.

review: Disapprove

Unmerged revisions

50. By Christopher Armstrong

make error reporting better. this looks like an obvious bug

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'python/subunit/__init__.py'
--- python/subunit/__init__.py 2007-02-12 19:29:18 +0000
+++ python/subunit/__init__.py 2007-08-10 20:55:43 +0000
@@ -215,15 +215,13 @@
215 def addError(self, test, error):215 def addError(self, test, error):
216 """Report an error in test test."""216 """Report an error in test test."""
217 self._stream.write("error: %s [\n" % test.shortDescription())217 self._stream.write("error: %s [\n" % test.shortDescription())
218 for line in self._exc_info_to_string(error, test).split():218 self._stream.write(self._exc_info_to_string(error, test))
219 self._stream.write("%s\n" % line)
220 self._stream.write("]\n")219 self._stream.write("]\n")
221220
222 def addFailure(self, test, error):221 def addFailure(self, test, error):
223 """Report a failure in test test."""222 """Report a failure in test test."""
224 self._stream.write("failure: %s [\n" % test.shortDescription())223 self._stream.write("failure: %s [\n" % test.shortDescription())
225 for line in self._exc_info_to_string(error, test).split():224 self._stream.write(self._exc_info_to_string(error, test))
226 self._stream.write("%s\n" % line)
227 self._stream.write("]\n")225 self._stream.write("]\n")
228226
229 def addSuccess(self, test):227 def addSuccess(self, test):

Subscribers

People subscribed via source and target branches