From fb4ea1378f201b8a34090004b3e65511e8914f4b Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sat, 13 Dec 2008 21:25:00 +0100 Subject: [PATCH] doctests must set __doc__ in Py2.3 --- tests/run/and.pyx | 2 +- tests/run/bint.pyx | 3 +-- tests/run/dictcomp.pyx | 2 +- tests/run/funcexceptcypy.pyx | 2 +- tests/run/inlinepxd.pyx | 2 +- tests/run/listcomp.pyx | 2 +- tests/run/nonecheck.pyx | 2 +- tests/run/or.pyx | 2 +- tests/run/r_typecast.pyx | 2 +- tests/run/set.pyx | 2 +- tests/run/setcomp.pyx | 2 +- tests/run/ticket_124.pyx | 2 +- tests/run/tryfinally.pyx | 2 +- 13 files changed, 13 insertions(+), 14 deletions(-) diff --git a/tests/run/and.pyx b/tests/run/and.pyx index 86165930..070ba6f0 100644 --- a/tests/run/and.pyx +++ b/tests/run/and.pyx @@ -1,4 +1,4 @@ -u""" +__doc__ = u""" >>> a,b = 'a *','b *' # use non-interned strings >>> and2_assign(2,3) == (2 and 3) diff --git a/tests/run/bint.pyx b/tests/run/bint.pyx index 827cf042..025c69e8 100644 --- a/tests/run/bint.pyx +++ b/tests/run/bint.pyx @@ -1,5 +1,4 @@ - -""" +__doc__ = u""" >>> call_test() False True diff --git a/tests/run/dictcomp.pyx b/tests/run/dictcomp.pyx index 7c3e92c7..0df23a4f 100644 --- a/tests/run/dictcomp.pyx +++ b/tests/run/dictcomp.pyx @@ -1,4 +1,4 @@ -u""" +__doc__ = u""" >>> type(smoketest()) is dict True diff --git a/tests/run/funcexceptcypy.pyx b/tests/run/funcexceptcypy.pyx index 391fed3f..f27a304a 100644 --- a/tests/run/funcexceptcypy.pyx +++ b/tests/run/funcexceptcypy.pyx @@ -1,4 +1,4 @@ -u""" +__doc__ = u""" >>> import sys >>> if not IS_PY3: sys.exc_clear() diff --git a/tests/run/inlinepxd.pyx b/tests/run/inlinepxd.pyx index 8220fa08..5c932f43 100644 --- a/tests/run/inlinepxd.pyx +++ b/tests/run/inlinepxd.pyx @@ -1,4 +1,4 @@ -""" +__doc__ = u""" >>> f() 3 >>> g() diff --git a/tests/run/listcomp.pyx b/tests/run/listcomp.pyx index d7c0ae0b..a7b9d1c2 100644 --- a/tests/run/listcomp.pyx +++ b/tests/run/listcomp.pyx @@ -1,4 +1,4 @@ -u""" +__doc__ = u""" >>> smoketest() [0, 4, 8] >>> typed() diff --git a/tests/run/nonecheck.pyx b/tests/run/nonecheck.pyx index 79ba6f10..96dd49c8 100644 --- a/tests/run/nonecheck.pyx +++ b/tests/run/nonecheck.pyx @@ -1,4 +1,4 @@ -""" +__doc__ = u""" Tests accessing attributes of extension type variables set to None diff --git a/tests/run/or.pyx b/tests/run/or.pyx index fb6d8e63..b50ecd40 100644 --- a/tests/run/or.pyx +++ b/tests/run/or.pyx @@ -1,4 +1,4 @@ -u""" +__doc__ = u""" >>> a,b = 'a *','b *' # use non-interned strings >>> or2_assign(2,3) == (2 or 3) diff --git a/tests/run/r_typecast.pyx b/tests/run/r_typecast.pyx index e7884b65..a4a6b598 100644 --- a/tests/run/r_typecast.pyx +++ b/tests/run/r_typecast.pyx @@ -1,4 +1,4 @@ -u""" +__doc__ = u""" >>> call_method( ExtType() ).method() 1 """ diff --git a/tests/run/set.pyx b/tests/run/set.pyx index bbb48e9f..8b78330f 100644 --- a/tests/run/set.pyx +++ b/tests/run/set.pyx @@ -1,4 +1,4 @@ -u""" +__doc__ = u""" >>> type(test_set_literal()) is _set True >>> sorted(test_set_literal()) diff --git a/tests/run/setcomp.pyx b/tests/run/setcomp.pyx index 9ab3b9f3..082ceeb2 100644 --- a/tests/run/setcomp.pyx +++ b/tests/run/setcomp.pyx @@ -1,4 +1,4 @@ -u""" +__doc__ = u""" >>> type(smoketest()) is not list True >>> type(smoketest()) is _set diff --git a/tests/run/ticket_124.pyx b/tests/run/ticket_124.pyx index 5f9b23a3..2a27bb9f 100644 --- a/tests/run/ticket_124.pyx +++ b/tests/run/ticket_124.pyx @@ -1,4 +1,4 @@ -""" +__doc__ = u""" >>> spam(dict(test=2)) False """ diff --git a/tests/run/tryfinally.pyx b/tests/run/tryfinally.pyx index 8caac5d7..871546d6 100644 --- a/tests/run/tryfinally.pyx +++ b/tests/run/tryfinally.pyx @@ -1,4 +1,4 @@ -u""" +__doc__ = u""" >>> try: ... raise ValueError ... finally: -- 2.26.2