Skip to content
Browse files

fix several broken array tests

  • Loading branch information...
1 parent 95b3e44 commit 6416e38e93538f733778d17a0241a827b9ecd01c @robertwb committed
Showing with 3 additions and 6 deletions.
  1. +3 −6 tests/run/pyarray.pyx
View
9 tests/run/pyarray.pyx
@@ -10,8 +10,8 @@ def test_len(a):
>>> a = array.array('f', [1.0, 2.0, 3.0])
>>> len(a)
3
- >>> test_len(a)
- 3L
+ >>> int(test_len(a))
+ 3
>>> assert len(a) == test_len(a)
"""
cdef array.array ca = a # for C-fast array usage
@@ -22,11 +22,11 @@ def test_copy(a):
>>> a = array.array('f', [1.0, 2.0, 3.0])
>>> test_copy(a)
array('f', [1.0, 2.0, 3.0])
- >>> assert a == test_copy(a)
"""
cdef array.array ca = a
cdef array.array b
b = array.copy(a)
+ assert a == b
a[2] = 3.5
assert b[2] != a[2]
return b
@@ -35,9 +35,6 @@ def test_copy(a):
def test_fast_access(a):
"""
>>> a = array.array('f', [1.0, 2.0, 3.0])
- >>> a[2]
- 3.5
-
>>> test_fast_access(a)
"""

0 comments on commit 6416e38

Please sign in to comment.
Something went wrong with that request. Please try again.