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
b623fb85
Commit
b623fb85
authored
Nov 21, 2011
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doctest fixes for latest Py2.7
parent
ab7bc84f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
tests/run/dict_getitem.pyx
tests/run/dict_getitem.pyx
+1
-1
tests/run/index.pyx
tests/run/index.pyx
+4
-6
No files found.
tests/run/dict_getitem.pyx
View file @
b623fb85
...
@@ -21,7 +21,7 @@ def test(dict d, index):
...
@@ -21,7 +21,7 @@ def test(dict d, index):
>>> test(None, 1) # doctest: +ELLIPSIS
>>> test(None, 1) # doctest: +ELLIPSIS
Traceback (most recent call last):
Traceback (most recent call last):
TypeError: ...
subscriptable
...
TypeError: ...
object
...
"""
"""
return
d
[
index
]
return
d
[
index
]
...
...
tests/run/index.pyx
View file @
b623fb85
__doc__
=
u"""
__doc__
=
u"""
>>> index_object(100, 100)
>>> index_object(100, 100)
# doctest: +ELLIPSIS
Traceback (most recent call last):
Traceback (most recent call last):
...
...
TypeError: 'int' object
is unsubscriptable
TypeError: 'int' object
...
"""
"""
import
sys
import
sys
if
sys
.
version_info
>=
(
2
,
7
):
if
sys
.
version_info
<
(
2
,
5
):
__doc__
=
__doc__
.
replace
(
u'is unsubscriptable'
,
u'is not subscriptable'
)
__doc__
=
__doc__
.
replace
(
u"'int' object ..."
,
u'unsubscriptable object'
)
elif
sys
.
version_info
<
(
2
,
5
):
__doc__
=
__doc__
.
replace
(
u"'int' object is unsubscriptable"
,
u'unsubscriptable object'
)
import
cython
import
cython
...
...
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