Commit b623fb85 authored by Stefan Behnel's avatar Stefan Behnel

doctest fixes for latest Py2.7

parent ab7bc84f
......@@ -21,7 +21,7 @@ def test(dict d, index):
>>> test(None, 1) # doctest: +ELLIPSIS
Traceback (most recent call last):
TypeError: ...subscriptable...
TypeError: ...object...
"""
return d[index]
......
__doc__ = u"""
>>> index_object(100, 100)
>>> index_object(100, 100) # doctest: +ELLIPSIS
Traceback (most recent call last):
...
TypeError: 'int' object is unsubscriptable
TypeError: 'int' object ...
"""
import sys
if sys.version_info >= (2,7):
__doc__ = __doc__.replace(u'is unsubscriptable', u'is not subscriptable')
elif sys.version_info < (2,5):
__doc__ = __doc__.replace(u"'int' object is unsubscriptable", u'unsubscriptable object')
if sys.version_info < (2,5):
__doc__ = __doc__.replace(u"'int' object ...", u'unsubscriptable object')
import cython
......
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