[pypy-commit] pypy py3k: try to refactor this test to pass on python3 with -A
antocuni
noreply at buildbot.pypy.org
Mon Feb 13 18:27:07 CET 2012
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r52418:86bdb9ba2780
Date: 2012-02-11 11:49 +0100
http://bitbucket.org/pypy/pypy/changeset/86bdb9ba2780/
Log: try to refactor this test to pass on python3 with -A
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
@@ -133,10 +133,10 @@
raise KeyError
except:
try:
- raise IndexError, IndexError(), some_traceback
+ raise IndexError().with_traceback(some_traceback)
finally:
- assert sys.exc_info()[0] is KeyError
- assert sys.exc_info()[2] is not some_traceback
+ assert sys.exc_info()[0] is IndexError
+ assert sys.exc_info()[2].tb_next is some_traceback
""")
def test_tuple_type(self):
More information about the pypy-commit
mailing list