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
e36ec6c2
Commit
e36ec6c2
authored
Jul 06, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extend test
parent
74d42469
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
tests/run/charptr_cfunc_args.pyx
tests/run/charptr_cfunc_args.pyx
+25
-0
No files found.
tests/run/charptr_cfunc_args.pyx
View file @
e36ec6c2
# mode: run
from
cpython.version
cimport
PY_MAJOR_VERSION
from
cpython.version
cimport
PY_MAJOR_VERSION
...
@@ -15,4 +16,28 @@ def test_one_arg_indexing(s):
...
@@ -15,4 +16,28 @@ def test_one_arg_indexing(s):
"""
"""
cfunc
(
s
[
0
])
cfunc
(
s
[
0
])
z
=
cfunc
(
s
[
2
])
z
=
cfunc
(
s
[
2
])
assert
z
==
'z'
,
repr
(
z
)
return
cfunc
(
s
[
1
])
return
cfunc
(
s
[
1
])
'''
# FIXME: should these be allowed?
def test_one_arg_slicing(s):
"""
>>> test_one_arg_indexing(b'xyz')
'y'
"""
cfunc(s[:2])
z = cfunc(s[2:])
assert z == 'z', repr(z)
return cfunc(s[1:2])
def test_one_arg_adding(s):
"""
>>> test_one_arg_adding(b'xyz')
'abxyzqr'
"""
return cfunc(b"a" + b"b" + s + b"q" + b"r")
'''
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