Commit 49a62a9a authored by Dag Sverre Seljebotn's avatar Dag Sverre Seljebotn

Py3 testcase fixes

parent 6e837884
from __future__ import unicode_literals
# Tests buffer format string parsing.
__test__ = {}
......@@ -39,7 +41,7 @@ cdef class MockBuffer:
cdef object itemsize
def __init__(self, format, itemsize):
self.format = format
self.format = unicode(format).encode(u"ASCII")
self.itemsize = itemsize
self.zero = 0
self.minusone = -1
......@@ -232,7 +234,7 @@ def alignment_string(fmt, exc=None):
try:
buf = MockBuffer(fmt, sizeof(int))
except ValueError, e:
msg = e.message.replace("Big", "X").replace("Little", "X").replace("big", "X").replace("little", "X")
msg = unicode(e).replace("Big", "X").replace("Little", "X").replace("big", "X").replace("little", "X")
if msg != exc:
print msg
print " is not equal to"
......
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