From 1879e2ed9d42da4d1582618ae29e6694b03fa60a Mon Sep 17 00:00:00 2001 From: Lisandro Dalcin Date: Fri, 20 Aug 2010 11:39:24 -0300 Subject: [PATCH] skip __index__ test for Py<2.5 --- tests/run/special_methods_T561.pyx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/run/special_methods_T561.pyx b/tests/run/special_methods_T561.pyx index 1b829b49..27cce9cf 100644 --- a/tests/run/special_methods_T561.pyx +++ b/tests/run/special_methods_T561.pyx @@ -11,6 +11,8 @@ # special_methods_T561_py3.pyx for tests of the differences between # Python 2 and 3. +import sys + __doc__ = u""" >>> vs0 = VerySpecial(0) VS __init__ 0 @@ -152,9 +154,6 @@ __doc__ = u""" >>> vs0_rtruediv = vs0.__rtruediv__ >>> vs0_rtruediv(vs1) VS __truediv__ 1 / 0 - >>> vs0_index = vs0.__index__ - >>> vs0_index() - VS __index__ 0 >>> vs0_getitem = vs0.__getitem__ >>> vs0_getitem('foo') VS __getitem__ 0['foo'] @@ -301,6 +300,12 @@ __doc__ = u""" >>> Li() Long __long__ """ +if sys.version_info >= (2,5): + __doc__ += u"""\ + >>> vs0_index = vs0.__index__ + >>> vs0_index() + VS __index__ 0 +""" cdef class VerySpecial: cdef readonly int value -- 2.26.2