Commits

Armin Rigo committed c44352c

Fix the tests

  • Participants
  • Parent commits e5e6a05
  • Branches gc-minimark-pinning

Comments (0)

Files changed (1)

File pypy/rlib/test/test_rgc.py

 
 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