diff options
author | Dag Sverre Seljebotn <dagss@student.matnat.uio.no> | 2009-05-17 00:02:23 -0700 |
---|---|---|
committer | Dag Sverre Seljebotn <dagss@student.matnat.uio.no> | 2009-05-17 00:02:23 -0700 |
commit | 49a62a9a469f6ba06608aaff261a7219f6a5d0fc (patch) | |
tree | 1fcd624b1db1ee272ac2d6e6cbff5d3a86a2a4f5 | |
parent | 6e8378849935c3f54581d9a64c930aff90b1309f (diff) | |
download | cython-0.11.2.rc1.tar.gz |
Py3 testcase fixes0.11.2.rc1
-rw-r--r-- | tests/run/buffmt.pyx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/run/buffmt.pyx b/tests/run/buffmt.pyx index 982c8b946..35f3b867c 100644 --- a/tests/run/buffmt.pyx +++ b/tests/run/buffmt.pyx @@ -1,3 +1,5 @@ +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" |