mirror of https://github.com/python/cpython
condense with assertRaises
This commit is contained in:
parent
d3243d8db8
commit
50a2252851
|
@ -289,19 +289,8 @@ def noproblem3():
|
|||
inner()
|
||||
y = 1
|
||||
|
||||
try:
|
||||
errorInOuter()
|
||||
except UnboundLocalError:
|
||||
pass
|
||||
else:
|
||||
self.fail()
|
||||
|
||||
try:
|
||||
errorInInner()
|
||||
except NameError:
|
||||
pass
|
||||
else:
|
||||
self.fail()
|
||||
self.assertRaises(UnboundLocalError, errorInOuter)
|
||||
self.assertRaises(NameError, errorInInner)
|
||||
|
||||
# test for bug #1501934: incorrect LOAD/STORE_GLOBAL generation
|
||||
exec """
|
||||
|
|
Loading…
Reference in New Issue