[pypy-commit] pypy py3k: add two tests which fails because we don't emit/implement POP_EXCEPT
antocuni
noreply at buildbot.pypy.org
Mon Feb 13 18:27:19 CET 2012
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r52427:b4da0d057eac
Date: 2012-02-13 18:26 +0100
http://bitbucket.org/pypy/pypy/changeset/b4da0d057eac/
Log: add two tests which fails because we don't emit/implement POP_EXCEPT
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
@@ -50,6 +50,29 @@
else:
raise AssertionError("shouldn't be able to raise 1")
+ def test_revert_exc_info_1(self):
+ import sys
+ assert sys.exc_info() == (None, None, None)
+ try:
+ raise ValueError
+ except:
+ pass
+ assert sys.exc_info() == (None, None, None)
+
+ def test_revert_exc_info_2(self):
+ import sys
+ assert sys.exc_info() == (None, None, None)
+ try:
+ raise ValueError
+ except:
+ try:
+ raise IndexError
+ except:
+ assert sys.exc_info()[0] is IndexError
+ assert sys.exc_info()[0] is ValueError
+ assert sys.exc_info() == (None, None, None)
+
+
def test_raise_with___traceback__(self):
import sys
try:
More information about the pypy-commit
mailing list