[pypy-svn] r49769 - pypy/dist/pypy/translator/c/test

arigo at codespeak.net arigo at codespeak.net
Fri Dec 14 11:41:24 CET 2007


Author: arigo
Date: Fri Dec 14 11:41:24 2007
New Revision: 49769

Modified:
   pypy/dist/pypy/translator/c/test/test_boehm.py
Log:
Fix test.  (It was skipped by mistake until two days ago)


Modified: pypy/dist/pypy/translator/c/test/test_boehm.py
==============================================================================
--- pypy/dist/pypy/translator/c/test/test_boehm.py	(original)
+++ pypy/dist/pypy/translator/c/test/test_boehm.py	Fri Dec 14 11:41:24 2007
@@ -98,8 +98,9 @@
         assert 0 < res <= 84
 
     def test_id_is_weak(self):
-        # test that id(obj) does not keep obj alive
+        # test that compute_unique_id(obj) does not keep obj alive
         from pypy.rpython.lltypesystem.lloperation import llop
+        from pypy.rlib.objectmodel import compute_unique_id
         class State:
             pass
         s = State()
@@ -113,11 +114,11 @@
             pass
         def run_once():
             a = A()
-            ida = id(a)
+            ida = compute_unique_id(a)
             b = B()
-            idb = id(b)
+            idb = compute_unique_id(b)
             c = C()
-            idc = id(c)
+            idc = compute_unique_id(c)
             llop.gc__collect(lltype.Void)
             llop.gc__collect(lltype.Void)
             llop.gc__collect(lltype.Void)



More information about the Pypy-commit mailing list