is purely cosmetic as the parameters are passed down with no interpretation.
(Robert Collins, #537611)
+* Old style tracebacks with no encoding info are now treated as UTF8 rather
+ than some-random-codec-like-ascii. (Robert Collins)
+
* On windows, ProtocolTestCase and TestProtocolClient will set their streams to
binary mode by calling into msvcrt; this avoids having their input or output
mangled by the default line ending translation on that platform.
raise ValueError
if error is not None:
self._stream.write(" [\n")
+ # XXX: this needs to be made much stricter, along the lines of
+ # Martin[gz]'s work in testtools. Perhaps subunit can use that?
for line in self._exc_info_to_string(error, test).splitlines():
self._stream.write("%s\n" % line)
else:
def get_details(self, style=None):
result = {}
if not style:
+ # We know that subunit/testtools serialise [] formatted
+ # tracebacks as utf8, but perhaps we need a ReplacingContent
+ # or something like that.
result['traceback'] = content.Content(
- content_type.ContentType("text", "x-traceback"),
+ content_type.ContentType("text", "x-traceback",
+ {"charset": "utf8"}),
lambda:[self._message])
else:
if style == 'skip':