[pypy-svn] pypy fast-forward: Test for __doc__ values, specially RuntimeError.__doc__ which was not set.
amauryfa
commits-noreply at bitbucket.org
Thu Jan 13 11:44:55 CET 2011
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: fast-forward
Changeset: r40634:f3437c6abd7d
Date: 2011-01-12 16:23 +0100
http://bitbucket.org/pypy/pypy/changeset/f3437c6abd7d/
Log: Test for __doc__ values, specially RuntimeError.__doc__ which was
not set.
diff --git a/pypy/objspace/std/test/test_typeobject.py b/pypy/objspace/std/test/test_typeobject.py
--- a/pypy/objspace/std/test/test_typeobject.py
+++ b/pypy/objspace/std/test/test_typeobject.py
@@ -1009,6 +1009,9 @@
assert C.__dict__['__dict__'].__doc__.startswith("dictionary for")
assert C.__dict__['__weakref__'].__doc__.startswith("list of weak")
+ assert property.__doc__.startswith("property(fget=None,")
+ assert type.__doc__.startswith("type(object)")
+ assert "run-time error" in RuntimeError.__doc__
class AppTestGetattributeShortcut:
diff --git a/pypy/objspace/std/stdtypedef.py b/pypy/objspace/std/stdtypedef.py
--- a/pypy/objspace/std/stdtypedef.py
+++ b/pypy/objspace/std/stdtypedef.py
@@ -89,6 +89,8 @@
overridetypedef = typedef
w_type = W_TypeObject(space, typedef.name, bases_w, dict_w,
overridetypedef=overridetypedef)
+ if isinstance(typedef.doc, str):
+ w_type.w_doc = space.wrap(typedef.doc)
w_type.lazyloaders = lazyloaders
return w_type
More information about the Pypy-commit
mailing list