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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
cython
Commits
2da931cd
Commit
2da931cd
authored
Aug 22, 2008
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more test fixes
parent
9f1e12bf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
19 deletions
+11
-19
tests/run/extstarargs.pyx
tests/run/extstarargs.pyx
+4
-4
tests/run/r_pythonapi.pyx
tests/run/r_pythonapi.pyx
+1
-1
tests/run/r_toofewargs.pyx
tests/run/r_toofewargs.pyx
+2
-6
tests/run/starargs.pyx
tests/run/starargs.pyx
+4
-8
No files found.
tests/run/extstarargs.pyx
View file @
2da931cd
...
@@ -35,9 +35,9 @@ __doc__ = u"""
...
@@ -35,9 +35,9 @@ __doc__ = u"""
TypeError: swallow() takes exactly 3 positional arguments (4 given)
TypeError: swallow() takes exactly 3 positional arguments (4 given)
>>> swallow(1,2,3, a=1, b=2)
>>> swallow(1,2,3, a=1, b=2)
(1, 2, 3, (('a', 1), ('b', 2)))
(1, 2, 3, (('a', 1), ('b', 2)))
>>> swallow(1,2,3, x=1)
#doctest: +ELLIPSIS
>>> swallow(1,2,3, x=1)
Traceback (most recent call last):
Traceback (most recent call last):
TypeError:
keyword parameter 'x' was given by position and by name
TypeError:
swallow() got multiple values for keyword argument 'x'
>>> creosote(1,2,3)
>>> creosote(1,2,3)
(1, 2, 3, (), ())
(1, 2, 3, (), ())
...
@@ -47,9 +47,9 @@ __doc__ = u"""
...
@@ -47,9 +47,9 @@ __doc__ = u"""
(1, 2, 3, (), (('a', 1),))
(1, 2, 3, (), (('a', 1),))
>>> creosote(1,2,3,4, a=1, b=2)
>>> creosote(1,2,3,4, a=1, b=2)
(1, 2, 3, (4,), (('a', 1), ('b', 2)))
(1, 2, 3, (4,), (('a', 1), ('b', 2)))
>>> creosote(1,2,3,4, x=1)
#doctest: +ELLIPSIS
>>> creosote(1,2,3,4, x=1)
Traceback (most recent call last):
Traceback (most recent call last):
TypeError:
keyword parameter 'x' was given by position and by name
TypeError:
creosote() got multiple values for keyword argument 'x'
>>> onlyt(1)
>>> onlyt(1)
(1,)
(1,)
...
...
tests/run/r_pythonapi.pyx
View file @
2da931cd
...
@@ -11,7 +11,7 @@ if sys.version_info[0] >= 3:
...
@@ -11,7 +11,7 @@ if sys.version_info[0] >= 3:
cdef
extern
from
"string.h"
:
cdef
extern
from
"string.h"
:
void
memcpy
(
char
*
d
,
char
*
s
,
int
n
)
void
memcpy
(
char
*
d
,
char
*
s
,
int
n
)
from
python
cimport
PyUnicode_DecodeUTF8
from
python
_unicode
cimport
PyUnicode_DecodeUTF8
def
spam
():
def
spam
():
cdef
char
buf
[
12
]
cdef
char
buf
[
12
]
...
...
tests/run/r_toofewargs.pyx
View file @
2da931cd
__doc__
=
u"""
__doc__
=
u"""
>>> s = Spam()
#doctest: +ELLIPSIS
>>> s = Spam()
Traceback (most recent call last):
Traceback (most recent call last):
TypeError:
function takes exactly 3
arguments (0 given)
TypeError:
__init__() takes exactly 3 positional
arguments (0 given)
"""
"""
import
sys
,
re
if
sys
.
version_info
>=
(
2
,
6
):
__doc__
=
re
.
sub
(
u"Error: .*"
,
u"Error: ..."
,
__doc__
)
cdef
class
Spam
:
cdef
class
Spam
:
def
__init__
(
self
,
a
,
b
,
int
c
):
def
__init__
(
self
,
a
,
b
,
int
c
):
...
...
tests/run/starargs.pyx
View file @
2da931cd
...
@@ -31,9 +31,9 @@ __doc__ = u"""
...
@@ -31,9 +31,9 @@ __doc__ = u"""
TypeError: swallow() takes exactly 3 positional arguments (4 given)
TypeError: swallow() takes exactly 3 positional arguments (4 given)
>>> swallow(1,2,3, a=1, b=2)
>>> swallow(1,2,3, a=1, b=2)
(1, 2, 3, (('a', 1), ('b', 2)))
(1, 2, 3, (('a', 1), ('b', 2)))
>>> swallow(1,2,3, x=1)
#doctest: +ELLIPSIS
>>> swallow(1,2,3, x=1)
Traceback (most recent call last):
Traceback (most recent call last):
TypeError:
keyword parameter 'x' was given by position and by name
TypeError:
swallow() got multiple values for keyword argument 'x'
>>> creosote(1,2,3)
>>> creosote(1,2,3)
(1, 2, 3, (), ())
(1, 2, 3, (), ())
...
@@ -43,9 +43,9 @@ __doc__ = u"""
...
@@ -43,9 +43,9 @@ __doc__ = u"""
(1, 2, 3, (), (('a', 1),))
(1, 2, 3, (), (('a', 1),))
>>> creosote(1,2,3,4, a=1, b=2)
>>> creosote(1,2,3,4, a=1, b=2)
(1, 2, 3, (4,), (('a', 1), ('b', 2)))
(1, 2, 3, (4,), (('a', 1), ('b', 2)))
>>> creosote(1,2,3,4, x=1)
#doctest: +ELLIPSIS
>>> creosote(1,2,3,4, x=1)
Traceback (most recent call last):
Traceback (most recent call last):
TypeError:
keyword parameter 'x' was given by position and by name
TypeError:
creosote() got multiple values for keyword argument 'x'
>>> onlyt(1)
>>> onlyt(1)
(1,)
(1,)
...
@@ -84,10 +84,6 @@ __doc__ = u"""
...
@@ -84,10 +84,6 @@ __doc__ = u"""
(1, ('a', 1), ('b', 2))
(1, ('a', 1), ('b', 2))
"""
"""
import
sys
,
re
if
sys
.
version_info
>=
(
2
,
6
):
__doc__
=
re
.
sub
(
u"(ELLIPSIS[^>]*Error: )[^
\
n
]*
\
n
"
,
u"
\
\
1...
\
n
"
,
__doc__
,
re
.
M
)
cdef
sorteditems
(
d
):
cdef
sorteditems
(
d
):
l
=
list
(
d
.
items
())
l
=
list
(
d
.
items
())
l
.
sort
()
l
.
sort
()
...
...
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