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
ea87ad77
Commit
ea87ad77
authored
Jul 17, 2010
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test fix for Py<=2.5
parent
6837211b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
5 deletions
+1
-5
tests/run/dict_getitem.pyx
tests/run/dict_getitem.pyx
+1
-5
No files found.
tests/run/dict_getitem.pyx
View file @
ea87ad77
...
@@ -6,12 +6,10 @@ def test(dict d, index):
...
@@ -6,12 +6,10 @@ def test(dict d, index):
>>> test(d, 2)
>>> test(d, 2)
Traceback (most recent call last):
Traceback (most recent call last):
...
KeyError: 2
KeyError: 2
>>> test(d, (1,2))
>>> test(d, (1,2))
Traceback (most recent call last):
Traceback (most recent call last):
...
KeyError: (1, 2)
KeyError: (1, 2)
>>> class Unhashable:
>>> class Unhashable:
...
@@ -19,13 +17,11 @@ def test(dict d, index):
...
@@ -19,13 +17,11 @@ def test(dict d, index):
... raise ValueError
... raise ValueError
>>> test(d, Unhashable())
>>> test(d, Unhashable())
Traceback (most recent call last):
Traceback (most recent call last):
...
ValueError
ValueError
>>> test(None, 1) # doctest: +ELLIPSIS
>>> test(None, 1) # doctest: +ELLIPSIS
Traceback (most recent call last):
Traceback (most recent call last):
...
TypeError: ...subscriptable...
TypeError: 'NoneType' object is ...
"""
"""
return
d
[
index
]
return
d
[
index
]
...
...
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