[pypy-commit] pypy py3k: py3 hasattr goes through getattr

pjenvey noreply at buildbot.pypy.org
Wed May 7 00:25:33 CEST 2014


Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3k
Changeset: r71351:742fbfe69840
Date: 2014-05-06 15:24 -0700
http://bitbucket.org/pypy/pypy/changeset/742fbfe69840/

Log:	py3 hasattr goes through getattr

diff --git a/pypy/module/cppyy/test/test_datatypes.py b/pypy/module/cppyy/test/test_datatypes.py
--- a/pypy/module/cppyy/test/test_datatypes.py
+++ b/pypy/module/cppyy/test/test_datatypes.py
@@ -108,9 +108,8 @@
         # can not access an instance member on the class
         raises(ReferenceError, getattr, cppyy_test_data, 'm_bool')
         raises(ReferenceError, getattr, cppyy_test_data, 'm_int')
-
-        assert not hasattr(cppyy_test_data, 'm_bool')
-        assert not hasattr(cppyy_test_data, 'm_int')
+        raises(ReferenceError, hasattr, cppyy_test_data, 'm_bool')
+        raises(ReferenceError, hasattr, cppyy_test_data, 'm_int')
 
         c.destruct()
 


More information about the pypy-commit mailing list