Merge lp:~gz/testtools/wrap_utf8_terminals_804122 into lp:~testtools-committers/testtools/trunk
Proposed by
Martin Packman
Status: | Merged |
---|---|
Merged at revision: | 199 |
Proposed branch: | lp:~gz/testtools/wrap_utf8_terminals_804122 |
Merge into: | lp:~testtools-committers/testtools/trunk |
Diff against target: |
51 lines (+14/-7) 2 files modified
testtools/compat.py (+3/-1) testtools/tests/test_compat.py (+11/-6) |
To merge this branch: | bzr merge lp:~gz/testtools/wrap_utf8_terminals_804122 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
testtools developers | Pending | ||
Review via email: mp+66635@code.launchpad.net |
Description of the change
Fixes a misunderstanding I had about how smart Python 2 was when writing unicode to streams with a unicode encoding. Only print does the right thing, the write method is still dumb and some parts of testtools use `stream.write` rather than `print >>stream`.
There's a slight risk here in that a utf-8 stream will now reject non-ascii bytestrings, but that's what my terminal has been doing since I introduced this code.
To post a comment you must log in.
Thanks for the fix. I'm going to try splitting the test into two to see if it's more clear that way.