Author: Antonio Cuni <[email protected]>
Branch: py3k
Changeset: r52420:58bf7b8c4517
Date: 2012-02-11 11:51 +0100
http://bitbucket.org/pypy/pypy/changeset/58bf7b8c4517/
Log: kill this test as well, we can only raise subclasses of
BaseException nowadays
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
@@ -164,51 +164,6 @@
except KeyError:
pass
- def test_oldstyle_userclass(self):
- class A:
- def __init__(self, val=None):
- self.val = val
- class Sub(A):
- pass
-
- try:
- raise Sub
- except IndexError:
- assert 0
- except A, a:
- assert a.__class__ is Sub
-
- sub = Sub()
- try:
- raise sub
- except IndexError:
- assert 0
- except A, a:
- assert a is sub
-
- try:
- raise A, sub
- except IndexError:
- assert 0
- except A, a:
- assert a is sub
- assert sub.val is None
-
- try:
- raise Sub, 42
- except IndexError:
- assert 0
- except A, a:
- assert a.__class__ is Sub
- assert a.val == 42
-
- try:
- {}[5]
- except A, a:
- assert 0
- except KeyError:
- pass
-
def test_catch_tuple(self):
class A:
pass
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit