From 544a92e1e375e1609b046cd23a7484a1cf7bc8ac Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Tue, 3 Oct 2017 19:56:40 +0200 Subject: Make test more portable. Python's array() type does not support the buffer interface in Py2. --- tests/run/pure_pxd.srctree | 7 +++---- 1 file 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) -- cgit v1.2.1