diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-07-20 22:37:19 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-07-20 22:37:19 (GMT) |
commit | 013783c529cfc459d05d261f5053ad7bf7d88c29 (patch) | |
tree | 14e1b8205a78e85d9ba688f315cf89f82aad3a20 /Lib/test/test_scope.py | |
parent | 533a167a713be4a30b92583636cd2323f4c8c3aa (diff) | |
download | cpython-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.py | 8 |
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) |