[pypy-commit] pypy py3k: kill this test as well, we can only raise subclasses of BaseException nowadays

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


Author: Antonio Cuni <anto.cuni at gmail.com>
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


More information about the pypy-commit mailing list