projects
/
platform
/
upstream
/
python-cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
450a77b
)
updated test to use clone function.
author
Andreas van Cranenburgh
<andreas@unstable.nl>
Wed, 16 May 2012 19:07:42 +0000
(21:07 +0200)
committer
Andreas van Cranenburgh
<andreas@unstable.nl>
Wed, 16 May 2012 19:07:42 +0000
(21:07 +0200)
tests pass when compiled and run manually.
tests/run/pyarray.pyx
patch
|
blob
|
history
diff --git
a/tests/run/pyarray.pyx
b/tests/run/pyarray.pyx
index
84c9d3f
..
01d2006
100644
(file)
--- a/
tests/run/pyarray.pyx
+++ b/
tests/run/pyarray.pyx
@@
-56,7
+56,7
@@
def test_new_zero(a):
>>> test_new_zero(a)
array('f', [0.0, 0.0, 0.0])
"""
- cdef array.array cb = array.
zeros_like(a
)
+ cdef array.array cb = array.
clone(a, len(a), True
)
assert cb.length == len(a)
return cb
@@
-111,8
+111,8
@@
def test_likes(a):
>>> test_likes(a)
array('f', [0.0, 0.0, 0.0])
"""
- cdef array.array z = array.
zeros_like(a
)
- cdef array.array e = array.
empty_like(a
)
+ cdef array.array z = array.
clone(a, len(a), True
)
+ cdef array.array e = array.
clone(a, len(a), False
)
assert e.length == len(a)
return z