Kaydet (Commit) 48f4cf9b authored tarafından Martin v. Löwis's avatar Martin v. Löwis

Use BytesIO instead of cStringIO.StringIO.

üst 1bba9db0
from test import test_support
import unittest
import sys, os, cStringIO, subprocess
import sys, os, io, subprocess
import quopri
......@@ -145,16 +145,16 @@ zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz''')
@withpythonimplementation
def test_encode(self):
for p, e in self.STRINGS:
infp = cStringIO.StringIO(p)
outfp = cStringIO.StringIO()
infp = io.BytesIO(p)
outfp = io.BytesIO()
quopri.encode(infp, outfp, quotetabs=False)
self.assertEqual(outfp.getvalue(), e)
@withpythonimplementation
def test_decode(self):
for p, e in self.STRINGS:
infp = cStringIO.StringIO(e)
outfp = cStringIO.StringIO()
infp = io.BytesIO(e)
outfp = io.BytesIO()
quopri.decode(infp, outfp)
self.assertEqual(outfp.getvalue(), p)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment