Author: Antonio Cuni <anto.c...@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) _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit