[pypy-svn] r79175 - pypy/trunk/pypy/rpython/memory/test
arigo at codespeak.net
arigo at codespeak.net
Wed Nov 17 11:08:40 CET 2010
Author: arigo
Date: Wed Nov 17 11:08:36 2010
New Revision: 79175
Modified:
pypy/trunk/pypy/rpython/memory/test/test_gc.py
Log:
Simplify the failure.
Modified: pypy/trunk/pypy/rpython/memory/test/test_gc.py
==============================================================================
--- pypy/trunk/pypy/rpython/memory/test/test_gc.py (original)
+++ pypy/trunk/pypy/rpython/memory/test/test_gc.py Wed Nov 17 11:08:36 2010
@@ -278,6 +278,25 @@
res = self.interpret(f, [])
assert res
+ def test_bug_1(self):
+ import weakref
+ class B(object):
+ def __del__(self):
+ pass
+ def g():
+ b = B()
+ ref = weakref.ref(b)
+ b.ref = ref
+ return ref
+ def f():
+ ref = g()
+ llop.gc__collect(lltype.Void)
+ llop.gc__collect(lltype.Void)
+ result = (ref() is None)
+ return result
+ res = self.interpret(f, [])
+ assert res
+
def test_cycle_with_weakref_and_del(self):
import weakref, gc
class A(object):
More information about the Pypy-commit
mailing list