Commit e0207f27 authored by Stefan Behnel's avatar Stefan Behnel

adapt doctests to recent buffer exception changes in Py3.5

parent 5ada3451
...@@ -190,13 +190,13 @@ def acquire_nonbuffer1(first, second=None): ...@@ -190,13 +190,13 @@ def acquire_nonbuffer1(first, second=None):
""" """
>>> acquire_nonbuffer1(3) # doctest: +ELLIPSIS >>> acquire_nonbuffer1(3) # doctest: +ELLIPSIS
Traceback (most recent call last): Traceback (most recent call last):
TypeError: 'int' does not ... the buffer interface TypeError:... 'int'...
>>> acquire_nonbuffer1(type) # doctest: +ELLIPSIS >>> acquire_nonbuffer1(type) # doctest: +ELLIPSIS
Traceback (most recent call last): Traceback (most recent call last):
TypeError: 'type' does not ... the buffer interface TypeError:... 'type'...
>>> acquire_nonbuffer1(None, 2) # doctest: +ELLIPSIS >>> acquire_nonbuffer1(None, 2) # doctest: +ELLIPSIS
Traceback (most recent call last): Traceback (most recent call last):
TypeError: 'int' does not ... the buffer interface TypeError:... 'int'...
""" """
cdef object[int] buf cdef object[int] buf
buf = first buf = first
......
...@@ -14,7 +14,6 @@ from cython.parallel cimport prange, parallel ...@@ -14,7 +14,6 @@ from cython.parallel cimport prange, parallel
import gc import gc
import sys import sys
import re
if sys.version_info[0] < 3: if sys.version_info[0] < 3:
import __builtin__ as builtins import __builtin__ as builtins
...@@ -26,9 +25,6 @@ __test__ = {} ...@@ -26,9 +25,6 @@ __test__ = {}
def testcase(func): def testcase(func):
doctest = func.__doc__ doctest = func.__doc__
if sys.version_info >= (3,1,1):
doctest = doctest.replace('does not have the buffer interface',
'does not support the buffer interface')
if sys.version_info >= (3, 0): if sys.version_info >= (3, 0):
_u = str _u = str
else: else:
...@@ -162,22 +158,22 @@ def acquire_failure3(): ...@@ -162,22 +158,22 @@ def acquire_failure3():
@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 have the buffer interface TypeError:... 'int'...
>>> acquire_nonbuffer1(type) >>> acquire_nonbuffer1(type) # doctest: +ELLIPSIS
Traceback (most recent call last): Traceback (most recent call last):
... ...
TypeError: 'type' does not have the buffer interface TypeError:... 'type'...
>>> acquire_nonbuffer1(None, 2) >>> acquire_nonbuffer1(None, 2) # doctest: +ELLIPSIS
Traceback (most recent call last): Traceback (most recent call last):
... ...
TypeError: 'int' does not have the buffer interface TypeError:... 'int'...
>>> acquire_nonbuffer1(4, object()) >>> acquire_nonbuffer1(4, object()) # doctest: +ELLIPSIS
Traceback (most recent call last): Traceback (most recent call last):
... ...
TypeError: 'int' does not have the buffer interface TypeError:... 'int'...
""" """
cdef int[:] buf cdef 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