summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_scope.py
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2001-04-13 16:51:46 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2001-04-13 16:51:46 (GMT)
commitc76770c68c40021322c221dd6bcd62bf98356a33 (patch)
tree4aff013ffa1bac9bb368701fb77a80e08f53b8f3 /Lib/test/test_scope.py
parent62effc112793e7176acf9a9e7a852b104e2e1606 (diff)
downloadcpython-c76770c68c40021322c221dd6bcd62bf98356a33.zip
cpython-c76770c68c40021322c221dd6bcd62bf98356a33.tar.gz
cpython-c76770c68c40021322c221dd6bcd62bf98356a33.tar.bz2
Change error message raised when free variable is not yet bound. It
now raises NameError instead of UnboundLocalError, because the var in question is definitely not local. (This affects test_scope.py) Also update the recent fix by Ping using get_func_name(). Replace tests of get_func_name() return value with call to get_func_desc() to match all the other uses.
Diffstat (limited to 'Lib/test/test_scope.py')
-rw-r--r--Lib/test/test_scope.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_scope.py b/Lib/test/test_scope.py
index d6367b2..358c45a 100644
--- a/Lib/test/test_scope.py
+++ b/Lib/test/test_scope.py
@@ -291,7 +291,7 @@ else:
try:
errorInInner()
-except UnboundLocalError:
+except NameError:
pass
else:
raise TestFailed
@@ -435,3 +435,4 @@ d = f(2)(4)
verify(d.has_key('h'))
del d['h']
verify(d == {'x': 2, 'y': 7, 'w': 6})
+