Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
e0207f27
Commit
e0207f27
authored
Oct 10, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adapt doctests to recent buffer exception changes in Py3.5
parent
5ada3451
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
15 deletions
+11
-15
tests/buffers/bufaccess.pyx
tests/buffers/bufaccess.pyx
+3
-3
tests/memoryview/memslice.pyx
tests/memoryview/memslice.pyx
+8
-12
No files found.
tests/buffers/bufaccess.pyx
View file @
e0207f27
...
...
@@ -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
...
...
tests/memoryview/memslice.pyx
View file @
e0207f27
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment