[pypy-svn] r59531 - pypy/trunk/lib-python/modified-2.5.2/test

arigo at codespeak.net arigo at codespeak.net
Thu Oct 30 10:56:19 CET 2008


Author: arigo
Date: Thu Oct 30 10:56:19 2008
New Revision: 59531

Modified:
   pypy/trunk/lib-python/modified-2.5.2/test/test_descr.py
Log:
Add a couple of TypeErrory lines in the test, and explain why.


Modified: pypy/trunk/lib-python/modified-2.5.2/test/test_descr.py
==============================================================================
--- pypy/trunk/lib-python/modified-2.5.2/test/test_descr.py	(original)
+++ pypy/trunk/lib-python/modified-2.5.2/test/test_descr.py	Thu Oct 30 10:56:19 2008
@@ -1722,6 +1722,14 @@
             class __metaclass__(type):
                 def mro(self):
                     return [self, dict, object]
+        # In CPython, the class creation above already raises
+        # TypeError, as a protection against the fact that
+        # instances of X would segfault it.  In other PyPy
+        # implementations it would be ok to let the class X
+        # be created, but instead get a clean TypeError on the
+        # __setitem__ below.
+        x = object.__new__(X)
+        x[5] = 6
     except TypeError:
         pass
     else:



More information about the Pypy-commit mailing list