Commit 52373ff5 authored by Stefan Behnel's avatar Stefan Behnel

fix doctest in Py3.4

parent 4d5dfea1
...@@ -28,11 +28,7 @@ def testcase(func): ...@@ -28,11 +28,7 @@ def testcase(func):
for e in exclude: for e in exclude:
if e(func.__name__): if e(func.__name__):
return func return func
doctest = func.__doc__ __test__[func.__name__] = func.__doc__
if sys.version_info >= (3,1,1):
doctest = doctest.replace('does not have the buffer interface',
'does not support the buffer interface')
__test__[func.__name__] = doctest
return func return func
...@@ -179,18 +175,15 @@ def acquire_failure5(): ...@@ -179,18 +175,15 @@ def acquire_failure5():
@testcase @testcase
def acquire_nonbuffer1(first, second=None): def acquire_nonbuffer1(first, second=None):
""" """
>>> acquire_nonbuffer1(3) >>> acquire_nonbuffer1(3) # doctest: +ELLIPSIS
Traceback (most recent call last): Traceback (most recent call last):
... TypeError: 'int' does not ... the buffer interface
TypeError: 'int' does not have the buffer interface >>> acquire_nonbuffer1(type) # doctest: +ELLIPSIS
>>> acquire_nonbuffer1(type)
Traceback (most recent call last): Traceback (most recent call last):
... TypeError: 'type' does not ... the buffer interface
TypeError: 'type' does not have the buffer interface >>> acquire_nonbuffer1(None, 2) # doctest: +ELLIPSIS
>>> acquire_nonbuffer1(None, 2)
Traceback (most recent call last): Traceback (most recent call last):
... TypeError: 'int' does not ... the buffer interface
TypeError: 'int' does not have the buffer interface
""" """
cdef object[int] buf cdef object[int] buf
buf = first buf = first
......
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