Commit 1879e2ed authored by Lisandro Dalcin's avatar Lisandro Dalcin

skip __index__ test for Py<2.5

parent 1acd2db4
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
# special_methods_T561_py3.pyx for tests of the differences between # special_methods_T561_py3.pyx for tests of the differences between
# Python 2 and 3. # Python 2 and 3.
import sys
__doc__ = u""" __doc__ = u"""
>>> vs0 = VerySpecial(0) >>> vs0 = VerySpecial(0)
VS __init__ 0 VS __init__ 0
...@@ -152,9 +154,6 @@ __doc__ = u""" ...@@ -152,9 +154,6 @@ __doc__ = u"""
>>> vs0_rtruediv = vs0.__rtruediv__ >>> vs0_rtruediv = vs0.__rtruediv__
>>> vs0_rtruediv(vs1) >>> vs0_rtruediv(vs1)
VS __truediv__ 1 / 0 VS __truediv__ 1 / 0
>>> vs0_index = vs0.__index__
>>> vs0_index()
VS __index__ 0
>>> vs0_getitem = vs0.__getitem__ >>> vs0_getitem = vs0.__getitem__
>>> vs0_getitem('foo') >>> vs0_getitem('foo')
VS __getitem__ 0['foo'] VS __getitem__ 0['foo']
...@@ -301,6 +300,12 @@ __doc__ = u""" ...@@ -301,6 +300,12 @@ __doc__ = u"""
>>> Li() >>> Li()
Long __long__ Long __long__
""" """
if sys.version_info >= (2,5):
__doc__ += u"""\
>>> vs0_index = vs0.__index__
>>> vs0_index()
VS __index__ 0
"""
cdef class VerySpecial: cdef class VerySpecial:
cdef readonly int value cdef readonly int value
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment