diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-12-29 00:37:04 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-12-29 00:37:04 (GMT) |
commit | 60a9c69c5e7b4ed4aef3903a7fa031d08c6b1979 (patch) | |
tree | 45276880986fdb292f30ad400bcfd47bfce1265d /Lib/lib2to3 | |
parent | ffa94b0f022a697dd491a0c31acd2e3b2629c048 (diff) | |
download | cpython-60a9c69c5e7b4ed4aef3903a7fa031d08c6b1979.zip cpython-60a9c69c5e7b4ed4aef3903a7fa031d08c6b1979.tar.gz cpython-60a9c69c5e7b4ed4aef3903a7fa031d08c6b1979.tar.bz2 |
fix test on py3
Diffstat (limited to 'Lib/lib2to3')
-rw-r--r-- | Lib/lib2to3/tests/test_main.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/lib2to3/tests/test_main.py b/Lib/lib2to3/tests/test_main.py index 23d1b56..2485f7a 100644 --- a/Lib/lib2to3/tests/test_main.py +++ b/Lib/lib2to3/tests/test_main.py @@ -25,12 +25,12 @@ class TestMain(unittest.TestCase): def test_unencodable_diff(self): input_stream = io.StringIO("print 'nothing'\nprint u'über'\n") - out = io.StringIO() + out = io.BytesIO() out_enc = codecs.getwriter("ascii")(out) err = io.StringIO() ret = self.run_2to3_capture(["-"], input_stream, out_enc, err) self.assertEqual(ret, 0) - output = out.getvalue() + output = out.getvalue().decode("ascii") self.assertTrue("-print 'nothing'" in output) self.assertTrue("WARNING: couldn't encode <stdin>'s diff for " "your terminal" in err.getvalue()) |