summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_scope.py
diff options
context:
space:
mode:
authorAlexandre Vassalotti <alexandre@peadrop.com>2009-07-21 02:51:58 (GMT)
committerAlexandre Vassalotti <alexandre@peadrop.com>2009-07-21 02:51:58 (GMT)
commit6f8281865292ff1cec78331cb881fa311c4f6f92 (patch)
treeca67f272a1ca2b16c70085a75001eabb9204999a /Lib/test/test_scope.py
parent7b53fbfd35dbb5497807bfcc560a93b64eada695 (diff)
downloadcpython-6f8281865292ff1cec78331cb881fa311c4f6f92.zip
cpython-6f8281865292ff1cec78331cb881fa311c4f6f92.tar.gz
cpython-6f8281865292ff1cec78331cb881fa311c4f6f92.tar.bz2
Merged revisions 73683,73786 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r73683 | georg.brandl | 2009-06-29 10:44:49 -0400 (Mon, 29 Jun 2009) | 1 line Fix error handling in PyCode_Optimize, by Alexander Schremmer at EuroPython sprint. ........ r73786 | benjamin.peterson | 2009-07-02 18:56:16 -0400 (Thu, 02 Jul 2009) | 1 line condense with assertRaises ........
Diffstat (limited to 'Lib/test/test_scope.py')
-rw-r--r--Lib/test/test_scope.py15
1 files changed, 2 insertions, 13 deletions
diff --git a/Lib/test/test_scope.py b/Lib/test/test_scope.py
index 84ceafa..ef56b88 100644
--- a/Lib/test/test_scope.py
+++ b/Lib/test/test_scope.py
@@ -272,19 +272,8 @@ def f():
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("""