Fix a couple of tests for Python 3

This commit is contained in:
Thomas Kluyver 2012-09-30 15:08:20 +01:00 • committed by Siu Kwan Lam
commit 87ffb437d8
2 changed files with 8 additions and 4 deletions

View file

@ -79,9 +79,11 @@ def do_module():
class strstream(object):
def __init__(self):
self.s = ''
self.s = b''
def write(self, data):
if not isinstance(data, bytes):
data = data.encode('utf-8')
self.s += data
def read(self):