projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0cd778f
)
more call tests with keywords
author
Robert Bradshaw
<robertwb@math.washington.edu>
Wed, 29 Oct 2008 00:10:34 +0000
(17:10 -0700)
committer
Robert Bradshaw
<robertwb@math.washington.edu>
Wed, 29 Oct 2008 00:10:34 +0000
(17:10 -0700)
tests/run/callargs.pyx
patch
|
blob
|
history
diff --git
a/tests/run/callargs.pyx
b/tests/run/callargs.pyx
index 1ca4bca4ed5665d5f109d17c18005e6810b35ff3..05ea79d67ffa888c70b2e2e90eb543d935005aff 100644
(file)
--- a/
tests/run/callargs.pyx
+++ b/
tests/run/callargs.pyx
@@
-100,6
+100,17
@@
__doc__ = u"""
1 2 0 0
>>> d(1,2,3)
1 2 1 0
+
+ >>> d(key=None)
+ Traceback (most recent call last):
+ TypeError: d() takes at least 1 positional argument (0 given)
+ >>> d(1, key=None)
+ 1 1 0 1
+ >>> d(1,2, key=None)
+ 1 2 0 1
+ >>> d(1,2,3, key=None)
+ 1 2 1 1
+
"""
def d(a, b=1, *args, **kwds):
@@
-125,7
+136,6
@@
if sys.version_info[0] >= 3:
else:
kwargs = {"test" : u"toast"}
-
def test_kw_args(f):
f(1,2, c=3)
f(1,2, d=3, *args)