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)


                 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():
         except TypeError, msg:
             self.assertTrue(str(msg).find("weak reference") >= 0)
-  "weakref.ref(no) should be illegal")
+            if test_support.check_impl_detail(pypy=False):
+      "weakref.ref(no) should be illegal")
+            #else: pypy supports taking weakrefs to some more objects
         class Weak(object):
             __slots__ = ['foo', '__weakref__']
         yes = Weak()