Author: Armin Rigo <[email protected]>
Branch: gc-minimark-pinning
Changeset: r55049:c44352ccea33
Date: 2012-05-11 20:21 +0200
http://bitbucket.org/pypy/pypy/changeset/c44352ccea33/
Log: Fix the tests
diff --git a/pypy/rlib/test/test_rgc.py b/pypy/rlib/test/test_rgc.py
--- a/pypy/rlib/test/test_rgc.py
+++ b/pypy/rlib/test/test_rgc.py
@@ -174,15 +174,18 @@
def test_pin_obj():
l = []
- with rgc.pinned_object(l):
- l.append(3)
+ assert rgc.pin(l) is False
+ l.append(3)
+ rgc.unpin(l)
assert l == [3]
def test_interp_pin_obj():
def f(i):
l = []
- with rgc.pinned_object(l):
- l.append(i)
+ pinned = rgc.pin(l)
+ l.append(i)
+ if pinned:
+ rgc.unpin(l)
return l[0]
assert interpret(f, [3]) == 3
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit