[pypy-commit] pypy py3k: now a py3 AttributeError but only on PyPy

pjenvey noreply at buildbot.pypy.org
Wed Nov 28 03:02:43 CET 2012


Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3k
Changeset: r59101:4b2ffe64b458
Date: 2012-11-27 18:04 -0800
http://bitbucket.org/pypy/pypy/changeset/4b2ffe64b458/

Log:	now a py3 AttributeError but only on PyPy

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
@@ -44,7 +44,9 @@
         # but not to objects without a dict, obviously
         dictdescr = type.__dict__['__dict__']
         raises(TypeError, dictdescr.__get__, 5)
-        raises(TypeError, dictdescr.__set__, 5, d)
+        # TypeError on CPython because descr applies only to its
+        # __objclass__
+        raises((AttributeError, TypeError), dictdescr.__set__, 5, d)
 
     def test_descr_member_descriptor(self):
         class X(object):


More information about the pypy-commit mailing list