[pypy-commit] pypy cpyext-ext: fix test: types which have the same size as PyObject should not cause instance layout conflicts

rlamy pypy.commits at gmail.com
Tue Feb 23 09:33:57 EST 2016


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: cpyext-ext
Changeset: r82442:7ee3179525f3
Date: 2016-02-23 15:33 +0100
http://bitbucket.org/pypy/pypy/changeset/7ee3179525f3/

Log:	fix test: types which have the same size as PyObject should not
	cause instance layout conflicts

diff --git a/pypy/module/cpyext/test/test_typeobject.py b/pypy/module/cpyext/test/test_typeobject.py
--- a/pypy/module/cpyext/test/test_typeobject.py
+++ b/pypy/module/cpyext/test/test_typeobject.py
@@ -396,7 +396,7 @@
                     which should have a different tp_getattro/tp_setattro
                     than its tp_base, which is 'object'.
                   */
-                  
+
                  if (!args->ob_type->tp_setattro)
                  {
                      PyErr_SetString(PyExc_ValueError, "missing tp_setattro");
@@ -719,7 +719,7 @@
                 long ival;
             } IntLikeObject;
 
-            static PyObject * 
+            static PyObject *
             intlike_nb_add(PyObject *self, PyObject *other)
             {
                 long val2, val1 = ((IntLikeObject *)(self))->ival;
@@ -782,7 +782,7 @@
     def test_app_cant_subclass_two_types(self):
         module = self.import_module(name='foo')
         try:
-            class bar(module.fooType, module.Property):
+            class bar(module.fooType, module.UnicodeSubtype):
                 pass
         except TypeError as e:
             assert str(e) == 'instance layout conflicts in multiple inheritance'


More information about the pypy-commit mailing list