Commit 92cd57bf authored by Stefan Behnel's avatar Stefan Behnel

test fix for Py<=2.5

parent f808f8ec
...@@ -28,15 +28,14 @@ __doc__ = u""" ...@@ -28,15 +28,14 @@ __doc__ = u"""
>>> b = B() >>> b = B()
>>> b.a0 #doctest: +ELLIPSIS >>> b.a0 #doctest: +ELLIPSIS
Traceback (most recent call last): Traceback (most recent call last):
...
AttributeError: ... AttributeError: ...
>>> b.b0 #doctest: +ELLIPSIS >>> b.b0 #doctest: +ELLIPSIS
Traceback (most recent call last): Traceback (most recent call last):
...
AttributeError: ... AttributeError: ...
>>> b.c0 #doctest: +ELLIPSIS >>> b.c0 #doctest: +ELLIPSIS
Traceback (most recent call last): Traceback (most recent call last):
...
AttributeError: ... AttributeError: ...
>>> isinstance(b.a1, type(None)) >>> isinstance(b.a1, type(None))
...@@ -56,28 +55,35 @@ True ...@@ -56,28 +55,35 @@ True
>>> b.a1 is not b.a2 >>> b.a1 is not b.a2
True True
TYPE_FIXES_REQUIRED:
>>> b.b1 = 1 #doctest: +ELLIPSIS >>> b.b1 = 1 #doctest: +ELLIPSIS
Traceback (most recent call last): Traceback (most recent call last):
...
TypeError: ... TypeError: ...
>>> b.c1 = 1 #doctest: +ELLIPSIS >>> b.c1 = 1 #doctest: +ELLIPSIS
Traceback (most recent call last): Traceback (most recent call last):
...
TypeError: ... TypeError: ...
>>> b.a2 = None #doctest: +ELLIPSIS >>> b.a2 = None #doctest: +ELLIPSIS
Traceback (most recent call last): Traceback (most recent call last):
...
AttributeError: ... AttributeError: ...
>>> b.b2 = [] #doctest: +ELLIPSIS >>> b.b2 = [] #doctest: +ELLIPSIS
Traceback (most recent call last): Traceback (most recent call last):
...
AttributeError: ... AttributeError: ...
>>> b.c2 = A() #doctest: +ELLIPSIS >>> b.c2 = A() #doctest: +ELLIPSIS
Traceback (most recent call last): Traceback (most recent call last):
...
AttributeError: ... AttributeError: ...
""" """
import sys
if sys.version_info < (2,5):
__doc__ = (__doc__.split('TYPE_FIXES_REQUIRED')[0] +
__doc__.split('TYPE_FIXES_REQUIRED')[1].replace('\nAttributeError: ...', '\nTypeError: ...'))
cdef class A: cdef class A:
cdef public short h cdef public short h
......
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