projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f7effcf
)
extended test case
author
Stefan Behnel
<scoder@users.berlios.de>
Tue, 23 Feb 2010 14:37:40 +0000
(15:37 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Tue, 23 Feb 2010 14:37:40 +0000
(15:37 +0100)
tests/run/dict_get.pyx
patch
|
blob
|
history
diff --git
a/tests/run/dict_get.pyx
b/tests/run/dict_get.pyx
index 3aa1b2afede310d9c352bfd1940454705adac305..546cbe6b58ec3c4cd44bc24d58067d51cef85193 100644
(file)
--- a/
tests/run/dict_get.pyx
+++ b/
tests/run/dict_get.pyx
@@
-51,5
+51,16
@@
def get_default(dict d, key, default):
2
>>> get_default(d, 2, 2)
2
+
+ >>> class Unhashable:
+ ... def __hash__(self):
+ ... raise ValueError
+
+ >>> d.get(Unhashable(), 2)
+ Traceback (most recent call last):
+ ValueError
+ >>> get_default(d, Unhashable(), 2)
+ Traceback (most recent call last):
+ ValueError
"""
return d.get(key, default)