[pypy-svn] pypy default: merge heads and fix the test, which now passes

antocuni commits-noreply at bitbucket.org
Tue Feb 15 16:00:50 CET 2011


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: 
Changeset: r41959:1cb79451c7dd
Date: 2011-02-15 16:00 +0100
http://bitbucket.org/pypy/pypy/changeset/1cb79451c7dd/

Log:	merge heads and fix the test, which now passes

diff --git a/pypy/objspace/std/test/test_mapdict.py b/pypy/objspace/std/test/test_mapdict.py
--- a/pypy/objspace/std/test/test_mapdict.py
+++ b/pypy/objspace/std/test/test_mapdict.py
@@ -24,14 +24,12 @@
         hasdict = False
 
 def test_plain_attribute():
-    class FakeClass(object):
-        pass
-    w_cls = FakeClass
+    w_cls = "class"
     aa = PlainAttribute(("b", DICT),
                         PlainAttribute(("a", DICT),
                                        Terminator(space, w_cls)))
     assert aa.space is space
-    assert aa.terminator.get_w_cls() is w_cls
+    assert aa.terminator.w_cls is w_cls
     assert aa.get_terminator() is aa.terminator
 
     obj = Object()
@@ -890,7 +888,7 @@
         def f():
             class C(object):
                 def m(self):
-                    42
+                    return 42
             r = weakref.ref(C)
             c = C()
             del C
@@ -898,6 +896,7 @@
             return c.m()
         val = f()
         assert val == 42
+        f() 
 
 class AppTestGlobalCaching(AppTestWithMapDict):
     def setup_class(cls):


More information about the Pypy-commit mailing list