← Back to team overview

launchpad-reviewers team mailing list archive

lp:~allenap/launchpad/revert-zope-test-in-subprocess-unicode-issue into lp:launchpad

 

Gavin Panella has proposed merging lp:~allenap/launchpad/revert-zope-test-in-subprocess-unicode-issue into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)


Don't pass a decoded stream reader to subunit.TestProtocolServer. Rob
says:

  Uhm, this is probably a terrible idea. subunit is a byte protocol,
  throwing unicode at it you should expect to keep both pieces.

See https://code.launchpad.net/~allenap/launchpad/zope-test-in-subprocess-unicode-issue/+merge/41886.

-- 
https://code.launchpad.net/~allenap/launchpad/revert-zope-test-in-subprocess-unicode-issue/+merge/41908
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~allenap/launchpad/revert-zope-test-in-subprocess-unicode-issue into lp:launchpad.
=== modified file 'lib/lp/testing/__init__.py'
--- lib/lp/testing/__init__.py	2010-11-25 16:55:15 +0000
+++ lib/lp/testing/__init__.py	2010-11-25 22:07:10 +0000
@@ -46,7 +46,6 @@
     'ZopeTestInSubProcess',
     ]
 
-import codecs
 from contextlib import contextmanager
 from datetime import (
     datetime,
@@ -865,7 +864,7 @@
             result = super(ZopeTestResult, result)
             # Accept the result from the child process.
             protocol = subunit.TestProtocolServer(result)
-            protocol.readFrom(codecs.getreader("utf8")(fdread))
+            protocol.readFrom(fdread)
             fdread.close()
             os.waitpid(pid, 0)