From ba02026a295d60912e68c97272bcf2150dcb0970 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Thu, 22 May 2008 21:10:20 +0200 Subject: [PATCH] Py2.6 test fixes --- tests/run/classkwonlyargs.pyx | 4 ++-- tests/run/extkwonlyargs.pyx | 2 +- tests/run/extstarargs.pyx | 4 ++-- tests/run/kwonlyargs.pyx | 2 +- tests/run/kwonlyargscall.pyx | 2 +- tests/run/r_docstrings.pyx | 2 +- tests/run/r_toofewargs.pyx | 2 +- tests/run/simpcall.pyx | 2 +- tests/run/starargs.pyx | 4 ++-- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/run/classkwonlyargs.pyx b/tests/run/classkwonlyargs.pyx index 92c2eba2..961c78ec 100644 --- a/tests/run/classkwonlyargs.pyx +++ b/tests/run/classkwonlyargs.pyx @@ -85,11 +85,11 @@ __doc__ = u""" """ import sys, re -if sys.version_info[0] >= 3: +if sys.version_info >= (2,6): __doc__ = re.sub(u"Error: (.*)exactly(.*)", u"Error: \\1at most\\2", __doc__) import sys, re -if sys.version_info[0] >= 3: +if sys.version_info >= (2,6): __doc__ = re.sub(u"(ELLIPSIS[^>]*Error: )[^\n]*\n", u"\\1...\n", __doc__, re.M) class Spam: diff --git a/tests/run/extkwonlyargs.pyx b/tests/run/extkwonlyargs.pyx index ca7efbae..5dc8306c 100644 --- a/tests/run/extkwonlyargs.pyx +++ b/tests/run/extkwonlyargs.pyx @@ -85,7 +85,7 @@ __doc__ = u""" """ import sys, re -if sys.version_info[0] >= 3: +if sys.version_info >= (2,6): __doc__ = re.sub(u"Error: (.*)exactly(.*)", u"Error: \\1at most\\2", __doc__) cdef class Ext: diff --git a/tests/run/extstarargs.pyx b/tests/run/extstarargs.pyx index b0fb06ec..454e6bde 100644 --- a/tests/run/extstarargs.pyx +++ b/tests/run/extstarargs.pyx @@ -89,11 +89,11 @@ __doc__ = u""" """ import sys, re -if sys.version_info[0] >= 3: +if sys.version_info >= (2,6): __doc__ = re.sub(u"Error: (.*)exactly(.*)", u"Error: \\1at most\\2", __doc__) import sys, re -if sys.version_info[0] >= 3: +if sys.version_info >= (2,6): __doc__ = re.sub(u"(ELLIPSIS[^>]*Error: )[^\n]*\n", u"\\1...\n", __doc__, re.M) cdef sorteditems(d): diff --git a/tests/run/kwonlyargs.pyx b/tests/run/kwonlyargs.pyx index 01bccc58..3bfd6e0f 100644 --- a/tests/run/kwonlyargs.pyx +++ b/tests/run/kwonlyargs.pyx @@ -82,7 +82,7 @@ __doc__ = u""" """ import sys, re -if sys.version_info[0] >= 3: +if sys.version_info >= (2,6): __doc__ = re.sub(u"Error: (.*)exactly(.*)", u"Error: \\1at most\\2", __doc__) def b(a, b, c): diff --git a/tests/run/kwonlyargscall.pyx b/tests/run/kwonlyargscall.pyx index 3f23dcd1..b7da7930 100644 --- a/tests/run/kwonlyargscall.pyx +++ b/tests/run/kwonlyargscall.pyx @@ -82,7 +82,7 @@ __doc__ = u""" """ import sys, re -if sys.version_info[0] >= 3: +if sys.version_info >= (2,6): __doc__ = re.sub(u"Error: (.*)exactly(.*)", u"Error: \\1at most\\2", __doc__) # the calls: diff --git a/tests/run/r_docstrings.pyx b/tests/run/r_docstrings.pyx index af88a5ce..60508fbe 100644 --- a/tests/run/r_docstrings.pyx +++ b/tests/run/r_docstrings.pyx @@ -1,4 +1,4 @@ -__doc__ = u""" +__doc__ = u"""# Python 3 gets all of these right ... >>> f.__doc__ 'This is a function docstring.' diff --git a/tests/run/r_toofewargs.pyx b/tests/run/r_toofewargs.pyx index 6479ca81..620f0ab5 100644 --- a/tests/run/r_toofewargs.pyx +++ b/tests/run/r_toofewargs.pyx @@ -5,7 +5,7 @@ __doc__ = u""" """ import sys, re -if sys.version_info[0] >= 3: +if sys.version_info >= (2,6): __doc__ = re.sub(u"Error: .*", u"Error: ...", __doc__) cdef class Spam: diff --git a/tests/run/simpcall.pyx b/tests/run/simpcall.pyx index 5e3f5f9e..e8f788ae 100644 --- a/tests/run/simpcall.pyx +++ b/tests/run/simpcall.pyx @@ -14,7 +14,7 @@ __doc__ = u""" """ import sys, re -if sys.version_info[0] >= 3: +if sys.version_info >= (2,6): __doc__ = re.sub(u"Error: .*exactly.*", u"Error: ...", __doc__) import sys diff --git a/tests/run/starargs.pyx b/tests/run/starargs.pyx index 5995848a..487d6b2f 100644 --- a/tests/run/starargs.pyx +++ b/tests/run/starargs.pyx @@ -85,11 +85,11 @@ __doc__ = u""" """ import sys, re -if sys.version_info[0] >= 3: +if sys.version_info >= (2,6): __doc__ = re.sub(u"Error: (.*)exactly(.*)", u"Error: \\1at most\\2", __doc__) import sys, re -if sys.version_info[0] >= 3: +if sys.version_info >= (2,6): __doc__ = re.sub(u"(ELLIPSIS[^>]*Error: )[^\n]*\n", u"\\1...\n", __doc__, re.M) cdef sorteditems(d): -- 2.26.2