summaryrefslogtreecommitdiff
path: root/tests/basics/fun_name.py
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2022-06-24 23:34:15 +1000
committerDamien George <damien@micropython.org>2022-06-24 23:55:13 +1000
commit268ec1e3eb818c92f2ad0015902afef4c4c59ba5 (patch)
tree621e8cfd134b46e0345d758d7f9ef93757b8ec8c /tests/basics/fun_name.py
parentd68532558d0f60737ccd5a38ae33f719333520a4 (diff)
tests/basics: Add tests for __name__ and __globals__ attrs on closures.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tests/basics/fun_name.py')
-rw-r--r--tests/basics/fun_name.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/basics/fun_name.py b/tests/basics/fun_name.py
index bb1f14992..b2642280a 100644
--- a/tests/basics/fun_name.py
+++ b/tests/basics/fun_name.py
@@ -24,9 +24,11 @@ except AttributeError:
pass
# name of a function that has closed over variables
+# and also the name of the inner closure
def outer():
x = 1
def inner():
return x
return inner
print(outer.__name__)
+print(outer().__name__)