From df0ff793e8a08ffe12bc96e7647be534647de43c Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Tue, 28 Oct 2008 17:10:34 -0700 Subject: [PATCH] more call tests with keywords --- tests/run/callargs.pyx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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) -- 2.26.2