From: Robert Bradshaw Date: Wed, 29 Oct 2008 00:10:34 +0000 (-0700) Subject: more call tests with keywords X-Git-Tag: 0.9.9.2.beta~2^2~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=df0ff793e8a08ffe12bc96e7647be534647de43c;p=cython.git more call tests with keywords --- diff --git a/tests/run/callargs.pyx b/tests/run/callargs.pyx index 1ca4bca4..05ea79d6 100644 --- 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)