From 108cab21f4c87202132ebf4171fff93b5bef93fa Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Thu, 8 Jan 2015 17:58:24 +0100 Subject: [PATCH] Added a closure test that would have failed before the names_dict refactoring. --- test/completion/ordering.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/completion/ordering.py b/test/completion/ordering.py index 32a85845..2c7e7fe5 100644 --- a/test/completion/ordering.py +++ b/test/completion/ordering.py @@ -89,6 +89,22 @@ def f(b, a): return a #? [] f(b=3) +# ----------------- +# closure +# ----------------- + +def x(): + a = 0 + + def x(): + return a + + a = 3.0 + return x() + +#? float() +x() + # ----------------- # class # -----------------