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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
52373ff5
Commit
52373ff5
authored
Nov 29, 2013
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix doctest in Py3.4
parent
4d5dfea1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
14 deletions
+7
-14
tests/buffers/bufaccess.pyx
tests/buffers/bufaccess.pyx
+7
-14
No files found.
tests/buffers/bufaccess.pyx
View file @
52373ff5
...
@@ -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
...
...
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