projects
/
platform
/
upstream
/
python-cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
22b7ce2
)
added test case for d[x,]
author
Stefan Behnel
<stefan_ml@behnel.de>
Sat, 10 Nov 2012 14:09:45 +0000
(15:09 +0100)
committer
Stefan Behnel
<stefan_ml@behnel.de>
Sat, 10 Nov 2012 14:09:45 +0000
(15:09 +0100)
tests/run/dict_getitem.pyx
patch
|
blob
|
history
diff --git
a/tests/run/dict_getitem.pyx
b/tests/run/dict_getitem.pyx
index
530be58
..
07622b0
100644
(file)
--- a/
tests/run/dict_getitem.pyx
+++ b/
tests/run/dict_getitem.pyx
@@
-30,6
+30,14
@@
def test(dict d, index):
"""
return d[index]
+def getitem_tuple(dict d, index):
+ """
+ >>> d = {1: 1, (1,): 2}
+ >>> getitem_tuple(d, 1)
+ (1, 2)
+ """
+ return d[index], d[index,]
+
def getitem_in_condition(dict d, key, expected_result):
"""
>>> d = dict(a=1, b=2)