Fix a couple of tests for Python 3
This commit is contained in:
parent
aba3e208d2
commit
87ffb437d8
2 changed files with 8 additions and 4 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue