[pypy-commit] pypy py3k: exception variables are cleared as soon as we exit the except: block now, so we must explicitly save the values
antocuni
noreply at buildbot.pypy.org
Mon May 14 12:05:36 CEST 2012
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r55080:bfb218d4a860
Date: 2012-05-10 23:44 +0200
http://bitbucket.org/pypy/pypy/changeset/bfb218d4a860/
Log: exception variables are cleared as soon as we exit the except: block
now, so we must explicitly save the values
diff --git a/pypy/interpreter/test/test_compiler.py b/pypy/interpreter/test/test_compiler.py
--- a/pypy/interpreter/test/test_compiler.py
+++ b/pypy/interpreter/test/test_compiler.py
@@ -994,14 +994,14 @@
source2 = "x = (\n\n"
try:
exec(source1)
- except SyntaxError as err1:
- pass
+ except SyntaxError as e:
+ err1 = e
else:
raise Exception("DID NOT RAISE")
try:
exec(source2)
- except SyntaxError as err2:
- pass
+ except SyntaxError as e:
+ err2 = e
else:
raise Exception("DID NOT RAISE")
assert str(err1) != str(err2)
More information about the pypy-commit
mailing list