From: Stefan Behnel Date: Tue, 22 Apr 2008 14:36:08 +0000 (+0200) Subject: let docstring test check string type (str/unicode) X-Git-Tag: 0.9.6.14~20^2~26 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2986d78b87be68ce0abb5790437bfae95e74e5d8;p=cython.git let docstring test check string type (str/unicode) --- diff --git a/tests/run/r_docstrings.pyx b/tests/run/r_docstrings.pyx index c95e42e4..cfb6f1e0 100644 --- a/tests/run/r_docstrings.pyx +++ b/tests/run/r_docstrings.pyx @@ -1,41 +1,39 @@ __doc__ = """ - >>> print f.__doc__ - This is a function docstring. + >>> f.__doc__ + 'This is a function docstring.' - >>> print C.__doc__ - This is a class docstring. - >>> print CS.__doc__ - This is a subclass docstring. + >>> C.__doc__ + 'This is a class docstring.' + >>> CS.__doc__ + 'This is a subclass docstring.' >>> print CSS.__doc__ None - >>> print T.__doc__ - This is an extension type docstring. - >>> print TS.__doc__ - This is an extension subtype docstring. - >>> print TSS.__doc__ - None + >>> T.__doc__ + 'This is an extension type docstring.' + >>> TS.__doc__ + 'This is an extension subtype docstring.' + >>> TSS.__doc__ Compare with standard Python: >>> def f(): - ... "This is a function docstring." - >>> print f.__doc__ - This is a function docstring. + ... 'This is a function docstring.' + >>> f.__doc__ + 'This is a function docstring.' >>> class C: - ... "This is a class docstring." + ... 'This is a class docstring.' >>> class CS(C): - ... "This is a subclass docstring." + ... 'This is a subclass docstring.' >>> class CSS(CS): ... pass - >>> print C.__doc__ - This is a class docstring. - >>> print CS.__doc__ - This is a subclass docstring. - >>> print CSS.__doc__ - None + >>> C.__doc__ + 'This is a class docstring.' + >>> CS.__doc__ + 'This is a subclass docstring.' + >>> CSS.__doc__ """ def f():