summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_scope.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-07-20 22:37:19 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-07-20 22:37:19 (GMT)
commit013783c529cfc459d05d261f5053ad7bf7d88c29 (patch)
tree14e1b8205a78e85d9ba688f315cf89f82aad3a20 /Lib/test/test_scope.py
parent533a167a713be4a30b92583636cd2323f4c8c3aa (diff)
downloadcpython-013783c529cfc459d05d261f5053ad7bf7d88c29.zip
cpython-013783c529cfc459d05d261f5053ad7bf7d88c29.tar.gz
cpython-013783c529cfc459d05d261f5053ad7bf7d88c29.tar.bz2
move test_trace.py so as not to conflict with future tests for the trace module
Diffstat (limited to 'Lib/test/test_scope.py')
-rw-r--r--Lib/test/test_scope.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_scope.py b/Lib/test/test_scope.py
index 643dcbc..1961e6e 100644
--- a/Lib/test/test_scope.py
+++ b/Lib/test/test_scope.py
@@ -690,6 +690,14 @@ result2 = h()
h = g()
self.assertEqual(h(), 3)
+ def testLocalClosureShadowing(self):
+ exec("""
+x = 4
+def f(x):
+ class C:
+ x = x
+raises(NameError, f, 3)""", {"raises" : self.assertRaises})
+
def test_main():
run_unittest(ScopeTests)