[pypy-svn] r47500 - pypy/dist/pypy/rpython/test

cfbolz at codespeak.net cfbolz at codespeak.net
Tue Oct 16 16:16:08 CEST 2007


Author: cfbolz
Date: Tue Oct 16 16:16:06 2007
New Revision: 47500

Modified:
   pypy/dist/pypy/rpython/test/test_rclass.py
Log:
make test actually test what was intended


Modified: pypy/dist/pypy/rpython/test/test_rclass.py
==============================================================================
--- pypy/dist/pypy/rpython/test/test_rclass.py	(original)
+++ pypy/dist/pypy/rpython/test/test_rclass.py	Tue Oct 16 16:16:06 2007
@@ -673,18 +673,20 @@
                 self.v = v
         
         class J(I):
+            _immutable_ = True
             def __init__(self, v, w):
                 self.w = w
                 I.__init__(self, v)
 
         j = J(3, 4)
         def f():
+            j.v = j.v * 1 # make the annotator think it is mutated
+            j.w = j.w * 1 # make the annotator think it is mutated
             return j.v + j.w
 
         t, typer, graph = self.gengraph(f, [], backendopt=True)
-        assert summary(graph) == {}
+        assert summary(graph) == {"setfield": 2}
         
-
     def test_instance_repr(self):
         class FooBar(object):
             pass



More information about the Pypy-commit mailing list