Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
6416e38e
Commit
6416e38e
authored
May 19, 2012
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix several broken array tests
parent
95b3e447
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
tests/run/pyarray.pyx
tests/run/pyarray.pyx
+3
-6
No files found.
tests/run/pyarray.pyx
View file @
6416e38e
...
@@ -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)
)
3
L
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)
"""
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment