Commit 6416e38e authored by Robert Bradshaw's avatar Robert Bradshaw

fix several broken array tests

parent 95b3e447
...@@ -10,8 +10,8 @@ def test_len(a): ...@@ -10,8 +10,8 @@ def test_len(a):
>>> a = array.array('f', [1.0, 2.0, 3.0]) >>> a = array.array('f', [1.0, 2.0, 3.0])
>>> len(a) >>> len(a)
3 3
>>> test_len(a) >>> int(test_len(a))
3L 3
>>> assert len(a) == test_len(a) >>> assert len(a) == test_len(a)
""" """
cdef array.array ca = a # for C-fast array usage cdef array.array ca = a # for C-fast array usage
...@@ -22,11 +22,11 @@ def test_copy(a): ...@@ -22,11 +22,11 @@ def test_copy(a):
>>> a = array.array('f', [1.0, 2.0, 3.0]) >>> a = array.array('f', [1.0, 2.0, 3.0])
>>> test_copy(a) >>> test_copy(a)
array('f', [1.0, 2.0, 3.0]) array('f', [1.0, 2.0, 3.0])
>>> assert a == test_copy(a)
""" """
cdef array.array ca = a cdef array.array ca = a
cdef array.array b cdef array.array b
b = array.copy(a) b = array.copy(a)
assert a == b
a[2] = 3.5 a[2] = 3.5
assert b[2] != a[2] assert b[2] != a[2]
return b return b
...@@ -35,9 +35,6 @@ def test_copy(a): ...@@ -35,9 +35,6 @@ def test_copy(a):
def test_fast_access(a): def test_fast_access(a):
""" """
>>> a = array.array('f', [1.0, 2.0, 3.0]) >>> a = array.array('f', [1.0, 2.0, 3.0])
>>> a[2]
3.5
>>> test_fast_access(a) >>> test_fast_access(a)
""" """
......
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