Commits

Armin Rigo committed 96e8390

* skip as impl detail the fact that CPython doesn't allow some
weakrefs, whereas PyPy does.

* skip for now the test about __sizeof__, relying on sys.getsizeof().

Comments (0)

Files changed (1)

lib-python/modified-2.7.0/test/test_descr.py

                 raise MyException
 
         for name, runner, meth_impl, ok, env in specials:
-            if name == '__length_hint__':
+            if name == '__length_hint__' or name == '__sizeof__':
                 if not test_support.check_impl_detail():
                     continue
 
         except TypeError, msg:
             self.assertTrue(str(msg).find("weak reference") >= 0)
         else:
-            self.fail("weakref.ref(no) should be illegal")
+            if test_support.check_impl_detail(pypy=False):
+                self.fail("weakref.ref(no) should be illegal")
+            #else: pypy supports taking weakrefs to some more objects
         class Weak(object):
             __slots__ = ['foo', '__weakref__']
         yes = Weak()