[pypy-commit] pypy issue2464: fix test

arigo pypy.commits at gmail.com
Sat Jan 14 08:28:09 EST 2017


Author: Armin Rigo <arigo at tunes.org>
Branch: issue2464
Changeset: r89556:899294ce2166
Date: 2017-01-14 14:26 +0100
http://bitbucket.org/pypy/pypy/changeset/899294ce2166/

Log:	fix test

diff --git a/pypy/interpreter/test/test_typedef.py b/pypy/interpreter/test/test_typedef.py
--- a/pypy/interpreter/test/test_typedef.py
+++ b/pypy/interpreter/test/test_typedef.py
@@ -140,7 +140,11 @@
             pass
         def fget(self, space, w_self):
             assert self is prop
-        prop = typedef.GetSetProperty(fget, use_closure=True)
+        # NB. this GetSetProperty is not copied when creating the
+        # W_TypeObject because of 'cls'.  Without it, a duplicate of the
+        # GetSetProperty is taken and it is given the w_objclass that is
+        # the W_TypeObject
+        prop = typedef.GetSetProperty(fget, use_closure=True, cls=W_SomeType)
         W_SomeType.typedef = typedef.TypeDef(
             'some_type',
             x=prop)


More information about the pypy-commit mailing list