diff --git a/tests/buffers/bufaccess.pyx b/tests/buffers/bufaccess.pyx index 077dde004a6ba86fe5d5bdbf01d67b2e0fa576ca..089239c1e1ce01f3c48f4a434a437b20ef0b9649 100644 --- a/tests/buffers/bufaccess.pyx +++ b/tests/buffers/bufaccess.pyx @@ -190,13 +190,13 @@ def acquire_nonbuffer1(first, second=None): """ >>> acquire_nonbuffer1(3) # doctest: +ELLIPSIS Traceback (most recent call last): - TypeError: 'int' does not ... the buffer interface + TypeError:... 'int'... >>> acquire_nonbuffer1(type) # doctest: +ELLIPSIS Traceback (most recent call last): - TypeError: 'type' does not ... the buffer interface + TypeError:... 'type'... >>> acquire_nonbuffer1(None, 2) # doctest: +ELLIPSIS Traceback (most recent call last): - TypeError: 'int' does not ... the buffer interface + TypeError:... 'int'... """ cdef object[int] buf buf = first diff --git a/tests/memoryview/memslice.pyx b/tests/memoryview/memslice.pyx index bd7e59c244c2e2393fa381ead8af0ac0a44ca4e2..2ef265865b541af34fb39558bf96b1762ce9968f 100644 --- a/tests/memoryview/memslice.pyx +++ b/tests/memoryview/memslice.pyx @@ -14,7 +14,6 @@ from cython.parallel cimport prange, parallel import gc import sys -import re if sys.version_info[0] < 3: import __builtin__ as builtins @@ -26,9 +25,6 @@ __test__ = {} def testcase(func): 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): _u = str else: @@ -162,22 +158,22 @@ def acquire_failure3(): @testcase def acquire_nonbuffer1(first, second=None): """ - >>> acquire_nonbuffer1(3) + >>> acquire_nonbuffer1(3) # doctest: +ELLIPSIS Traceback (most recent call last): ... - TypeError: 'int' does not have the buffer interface - >>> acquire_nonbuffer1(type) + TypeError:... 'int'... + >>> acquire_nonbuffer1(type) # doctest: +ELLIPSIS Traceback (most recent call last): ... - TypeError: 'type' does not have the buffer interface - >>> acquire_nonbuffer1(None, 2) + TypeError:... 'type'... + >>> acquire_nonbuffer1(None, 2) # doctest: +ELLIPSIS Traceback (most recent call last): ... - TypeError: 'int' does not have the buffer interface - >>> acquire_nonbuffer1(4, object()) + TypeError:... 'int'... + >>> acquire_nonbuffer1(4, object()) # doctest: +ELLIPSIS Traceback (most recent call last): ... - TypeError: 'int' does not have the buffer interface + TypeError:... 'int'... """ cdef int[:] buf buf = first