[pypy-commit] pypy py3k: because of 46769341e0eb, __doc__ is now stored as a normal property, and thus we wrap it twice. Check for equality, not identity

antocuni noreply at buildbot.pypy.org
Fri Feb 24 11:19:05 CET 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r52840:c23a682f1a95
Date: 2012-02-24 11:08 +0100
http://bitbucket.org/pypy/pypy/changeset/c23a682f1a95/

Log:	because of 46769341e0eb, __doc__ is now stored as a normal property,
	and thus we wrap it twice. Check for equality, not identity

diff --git a/pypy/interpreter/test/test_objspace.py b/pypy/interpreter/test/test_objspace.py
--- a/pypy/interpreter/test/test_objspace.py
+++ b/pypy/interpreter/test/test_objspace.py
@@ -128,7 +128,8 @@
         w = self.space.wrap
         w_object_doc = self.space.getattr(self.space.w_object, w("__doc__"))
         w_instance = self.space.appexec([], "(): return object()")
-        assert self.space.lookup(w_instance, "__doc__") == w_object_doc 
+        w_doc = self.space.lookup(w_instance, "__doc__")
+        assert self.space.str_w(w_doc) == self.space.str_w(w_object_doc)
         assert self.space.lookup(w_instance, "gobbledygook") is None
         w_instance = self.space.appexec([], """():
             class Lookup(object):


More information about the pypy-commit mailing list