diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2017-10-03 19:56:40 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2017-10-03 19:56:40 +0200 |
commit | 544a92e1e375e1609b046cd23a7484a1cf7bc8ac (patch) | |
tree | 2cdd35479229fb731d569d2ce02f8adff870ab00 | |
parent | 15ce8b91510117c2a25e08659c33ee3966d5131c (diff) | |
download | cython-544a92e1e375e1609b046cd23a7484a1cf7bc8ac.tar.gz |
Make test more portable. Python's array() type does not support the buffer interface in Py2.
-rw-r--r-- | tests/run/pure_pxd.srctree | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/run/pure_pxd.srctree b/tests/run/pure_pxd.srctree index 4e290dff5..59c71cdf6 100644 --- a/tests/run/pure_pxd.srctree +++ b/tests/run/pure_pxd.srctree @@ -41,11 +41,10 @@ class TypedMethod(): """ >>> t = TypedMethod() >>> t.meth() - 0.0 + 97 """ def meth(self): - from array import array - x = array('d', [0.0]) + x = bytearray(b'abcdefg') return x[0] @@ -91,7 +90,7 @@ cdef class ExtTypeAttributes: cdef class TypedMethod: - @cython.locals(x='double[:]') + @cython.locals(x='char[:]') cpdef meth(self) |