Author: Philip Jenvey <pjen...@underboss.org>
Branch: py3k
Changeset: r84606:9a7ec898d577
Date: 2016-05-22 16:24 -0700
http://bitbucket.org/pypy/pypy/changeset/9a7ec898d577/

Log:    fix test_qualname

diff --git a/lib-python/3/test/test_descr.py b/lib-python/3/test/test_descr.py
--- a/lib-python/3/test/test_descr.py
+++ b/lib-python/3/test/test_descr.py
@@ -4533,6 +4533,9 @@
             self.assertEqual(type(d).__name__, n + '_descriptor')
 
         for d in descriptors:
+            if (support.check_impl_detail(pypy=True) and
+                not hasattr(d, '__objclass__')):
+                continue
             qualname = d.__objclass__.__qualname__ + '.' + d.__name__
             self.assertEqual(d.__qualname__, qualname)
 
diff --git a/pypy/objspace/std/complexobject.py 
b/pypy/objspace/std/complexobject.py
--- a/pypy/objspace/std/complexobject.py
+++ b/pypy/objspace/std/complexobject.py
@@ -509,7 +509,7 @@
         if not isinstance(w_obj, W_ComplexObject):
             raise oefmt(space.w_TypeError, "descriptor is for 'complex'")
         return space.newfloat(getattr(w_obj, name))
-    return GetSetProperty(fget, doc=doc)
+    return GetSetProperty(fget, doc=doc, cls=W_ComplexObject)
 
 W_ComplexObject.typedef = TypeDef("complex",
     __doc__ = """complex(real[, imag]) -> complex number
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to