From 81c29d58d09efe897905c6989bb9b6a1af5f58f7 Mon Sep 17 00:00:00 2001 From: David Halter Date: Wed, 11 Jul 2012 02:25:43 +0200 Subject: [PATCH] tests for an additional variable in *args, **args --- test/completion/functions.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/completion/functions.py b/test/completion/functions.py index 057e3c49..73b94219 100644 --- a/test/completion/functions.py +++ b/test/completion/functions.py @@ -293,3 +293,21 @@ nested_both2('', b=1, c=1.0) nested_both2('', c=1.0, b=1) #? [] nested_both2('') + +# ----------------- +# nested *args/**kwargs with a default arg +# ----------------- +def nested_def(a, *args, **kwargs): + return function_args(a, *args, **kwargs) + +def nested_def2(*args, **kwargs): + return nested_def(*args, **kwargs) + +#? int() +nested_def2('', 1, 1.0) +#? int() +nested_def2('', b=1, c=1.0) +#? int() +nested_def2('', c=1.0, b=1) +#? [] +nested_def2('')