From 80a5c4f30aecfc094214a350461f30e6067a47b2 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Tue, 15 Jan 2008 14:47:06 +0100 Subject: [PATCH] test fixes after GetStarArgs() changes --- tests/run/kwonlyargs.pyx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/run/kwonlyargs.pyx b/tests/run/kwonlyargs.pyx index 78c523fd..451e13dc 100644 --- a/tests/run/kwonlyargs.pyx +++ b/tests/run/kwonlyargs.pyx @@ -1,8 +1,14 @@ __doc__ = """ + >>> b(1,2,3) + >>> b(1,2,3,4) + Traceback (most recent call last): + TypeError: function takes exactly 3 arguments (4 given) + + >>> c(1,2) >>> c(1,2,3) >>> c(1,2,3,4) Traceback (most recent call last): - TypeError: function takes exactly 3 arguments (4 given) + TypeError: function takes at most 3 arguments (4 given) >>> d(1,2) >>> d(1,2, c=1) @@ -63,7 +69,10 @@ __doc__ = """ TypeError: required keyword argument 'c' is missing """ -def c(a, b, c): +def b(a, b, c): + z = 22 + +def c(a, b, c=1): z = 33 def d(a, b, *, c = 88): -- 2.26.2