[pypy-commit] pypy py3k: f_exc_type no longer exists. Rewrite the test using exc_info(), and also the type of the exception is different

antocuni noreply at buildbot.pypy.org
Mon Feb 13 18:27:06 CET 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r52417:46a8ec490951
Date: 2012-02-11 11:33 +0100
http://bitbucket.org/pypy/pypy/changeset/46a8ec490951/

Log:	f_exc_type no longer exists. Rewrite the test using exc_info(), and
	also the type of the exception is different

diff --git a/pypy/interpreter/test/test_raise.py b/pypy/interpreter/test/test_raise.py
--- a/pypy/interpreter/test/test_raise.py
+++ b/pypy/interpreter/test/test_raise.py
@@ -101,7 +101,7 @@
                     raise KeyError
                 except KeyError:
                     pass
-                assert sys._getframe().f_exc_type is ValueError
+                assert sys.exc_info()[0] is IndexError
             try:
                 raise ValueError
             except:


More information about the pypy-commit mailing list