Commit 544a92e1 authored by Stefan Behnel's avatar Stefan Behnel

Make test more portable. Python's array() type does not support the buffer interface in Py2.

parent 15ce8b91
...@@ -41,11 +41,10 @@ class TypedMethod(): ...@@ -41,11 +41,10 @@ class TypedMethod():
""" """
>>> t = TypedMethod() >>> t = TypedMethod()
>>> t.meth() >>> t.meth()
0.0 97
""" """
def meth(self): def meth(self):
from array import array x = bytearray(b'abcdefg')
x = array('d', [0.0])
return x[0] return x[0]
...@@ -91,7 +90,7 @@ cdef class ExtTypeAttributes: ...@@ -91,7 +90,7 @@ cdef class ExtTypeAttributes:
cdef class TypedMethod: cdef class TypedMethod:
@cython.locals(x='double[:]') @cython.locals(x='char[:]')
cpdef meth(self) cpdef meth(self)
......
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