[Python-checkins] CVS: python/dist/src/Lib/test test_scope.py,1.13,1.14
Jeremy Hylton
jhylton@users.sourceforge.net
Fri, 13 Apr 2001 09:51:48 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv4675/Lib/test
Modified Files:
test_scope.py
Log Message:
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.
Index: test_scope.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_scope.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** test_scope.py 2001/03/21 16:44:39 1.13
--- test_scope.py 2001/04/13 16:51:46 1.14
***************
*** 292,296 ****
try:
errorInInner()
! except UnboundLocalError:
pass
else:
--- 292,296 ----
try:
errorInInner()
! except NameError:
pass
else:
***************
*** 436,437 ****
--- 436,438 ----
del d['h']
verify(d == {'x': 2, 'y': 7, 'w': 6})
+