From: Lisandro Dalcin Date: Fri, 20 Aug 2010 14:39:24 +0000 (-0300) Subject: skip __index__ test for Py<2.5 X-Git-Tag: 0.13~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1879e2ed9d42da4d1582618ae29e6694b03fa60a;p=cython.git skip __index__ test for Py<2.5 --- 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