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
1=== modified file 'python/subunit/__init__.py'
2--- python/subunit/__init__.py 2007-02-12 19:29:18 +0000
3+++ python/subunit/__init__.py 2007-08-10 20:55:43 +0000
4@@ -215,15 +215,13 @@
5 def addError(self, test, error):
6 """Report an error in test test."""
7 self._stream.write("error: %s [\n" % test.shortDescription())
8- for line in self._exc_info_to_string(error, test).split():
9- self._stream.write("%s\n" % line)
10+ self._stream.write(self._exc_info_to_string(error, test))
11 self._stream.write("]\n")
12
13 def addFailure(self, test, error):
14 """Report a failure in test test."""
15 self._stream.write("failure: %s [\n" % test.shortDescription())
16- for line in self._exc_info_to_string(error, test).split():
17- self._stream.write("%s\n" % line)
18+ self._stream.write(self._exc_info_to_string(error, test))
19 self._stream.write("]\n")
20
21 def addSuccess(self, test):

Subscribers

People subscribed via source and target branches