summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_frame.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_frame.py')
-rw-r--r--Lib/test/test_frame.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_frame.py b/Lib/test/test_frame.py
index 4d08606..a6e11f1 100644
--- a/Lib/test/test_frame.py
+++ b/Lib/test/test_frame.py
@@ -346,6 +346,12 @@ class TestFrameLocals(unittest.TestCase):
self.assertEqual(x, 2)
self.assertEqual(y, 3)
+ def test_closure_with_inline_comprehension(self):
+ lambda: k
+ k = 1
+ lst = [locals() for k in [0]]
+ self.assertEqual(lst[0]['k'], 0)
+
def test_as_dict(self):
x = 1
y = 2