summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_scope.py
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2002-04-20 04:51:39 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2002-04-20 04:51:39 (GMT)
commit954aed8c8d93145347d10fd3ac6c2bc6634ef674 (patch)
treeb8ad62abf82353f79cc12e1dbf1e95d6d1f5bb5d /Lib/test/test_scope.py
parent24ea8d3d9c85d54bcc8c242a073c0886a0273c36 (diff)
downloadcpython-954aed8c8d93145347d10fd3ac6c2bc6634ef674.zip
cpython-954aed8c8d93145347d10fd3ac6c2bc6634ef674.tar.gz
cpython-954aed8c8d93145347d10fd3ac6c2bc6634ef674.tar.bz2
Add test for eval() w/ free variables.
Related to SF bug #505315
Diffstat (limited to 'Lib/test/test_scope.py')
-rw-r--r--Lib/test/test_scope.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_scope.py b/Lib/test/test_scope.py
index 85cfed4..f39bbc2 100644
--- a/Lib/test/test_scope.py
+++ b/Lib/test/test_scope.py
@@ -512,3 +512,13 @@ try:
print bad
except NameError:
pass
+
+print "22. eval with free variables"
+
+def f(x):
+ def g():
+ x
+ eval("x + 1")
+ return g
+
+f(4)()