[pypy-svn] r17833 - pypy/dist/pypy/objspace/test

arigo at codespeak.net arigo at codespeak.net
Sat Sep 24 18:09:25 CEST 2005


Author: arigo
Date: Sat Sep 24 18:09:24 2005
New Revision: 17833

Modified:
   pypy/dist/pypy/objspace/test/test_thunkobjspace.py
Log:
Should not use become() on ints.  Now that we try to reuse a bit W_IntObject,
this is not a good idea at all.



Modified: pypy/dist/pypy/objspace/test/test_thunkobjspace.py
==============================================================================
--- pypy/dist/pypy/objspace/test/test_thunkobjspace.py	(original)
+++ pypy/dist/pypy/objspace/test/test_thunkobjspace.py	Sat Sep 24 18:09:24 2005
@@ -37,24 +37,24 @@
         assert d[7] == [43]
 
     def test_become(self):
-        x = 5
-        y = 6
+        x = []
+        y = []
         assert x is not y
         become(x, y)
         assert x is y
 
     def test_id(self):
         # these are the Smalltalk semantics of become().
-        x = 5; idx = id(x)
-        y = 6; idy = id(y)
+        x = []; idx = id(x)
+        y = []; idy = id(y)
         assert idx != idy
         become(x, y)
         assert id(x) == id(y) == idy
 
     def test_double_become(self):
-        x = 5
-        y = 6
-        z = 7
+        x = []
+        y = []
+        z = []
         become(x, y)
         become(y, z)
         assert x is y is z



More information about the Pypy-commit mailing list