From: Stefan Behnel Date: Thu, 25 Dec 2008 00:07:32 +0000 (+0100) Subject: extended test case X-Git-Tag: 0.11-beta~78 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=13e8dd858a9f40fd831444048315ee6cbf1e5a31;p=cython.git extended test case --- diff --git a/tests/run/kwonlyargs.pyx b/tests/run/kwonlyargs.pyx index 2994a559..aef2f1ef 100644 --- a/tests/run/kwonlyargs.pyx +++ b/tests/run/kwonlyargs.pyx @@ -89,6 +89,17 @@ __doc__ = u""" >>> l(1,2, d=1) Traceback (most recent call last): TypeError: l() takes exactly 0 positional arguments (2 given) + + >>> m(1, b=2) + >>> m(a=1, b=2) + >>> m(a=1, b=2, c=1) + + >>> l(1,2,3) + Traceback (most recent call last): + TypeError: l() takes exactly 0 positional arguments (3 given) + >>> l(1,2, d=1) + Traceback (most recent call last): + TypeError: l() takes exactly 0 positional arguments (2 given) """ def b(a, b, c): @@ -117,3 +128,6 @@ def k(a, b, c=1, *args, d = 42, e = 17, f, **kwds): def l(*, a, b, c = 88): pass + +def m(a, *, b, c = 88): + pass