[pypy-svn] r58825 - pypy/branch/2.5-merge/pypy/interpreter/test

arigo at codespeak.net arigo at codespeak.net
Wed Oct 8 15:35:25 CEST 2008


Author: arigo
Date: Wed Oct  8 15:35:25 2008
New Revision: 58825

Modified:
   pypy/branch/2.5-merge/pypy/interpreter/test/test_raise.py
Log:
* Restored the bit that iko and cfbolz lost in r58821.
* Fix test for new-style class support.


Modified: pypy/branch/2.5-merge/pypy/interpreter/test/test_raise.py
==============================================================================
--- pypy/branch/2.5-merge/pypy/interpreter/test/test_raise.py	(original)
+++ pypy/branch/2.5-merge/pypy/interpreter/test/test_raise.py	Wed Oct  8 15:35:25 2008
@@ -192,7 +192,8 @@
         raises(TypeError, f)
 
     def test_it(self):
-        C = _classobj('C', (), {})
+        class C:
+            pass
         # this used to explode in the exception normalization step:
         try:
             {}[C]
@@ -201,7 +202,6 @@
 
     def test_oldstyle_userclass(self):
         class A:
-            __metaclass__ = _classobj
             def __init__(self, val=None):
                 self.val = val
         class Sub(A):
@@ -237,3 +237,10 @@
         except A, a:
             assert a.__class__ is Sub
             assert a.val == 42
+
+        try:
+            {}[5]
+        except A, a:
+            assert 0
+        except KeyError:
+            pass



More information about the Pypy-commit mailing list