Commit ea87ad77 authored by Stefan Behnel's avatar Stefan Behnel

test fix for Py<=2.5

parent 6837211b
......@@ -6,12 +6,10 @@ def test(dict d, index):
>>> test(d, 2)
Traceback (most recent call last):
...
KeyError: 2
>>> test(d, (1,2))
Traceback (most recent call last):
...
KeyError: (1, 2)
>>> class Unhashable:
......@@ -19,13 +17,11 @@ def test(dict d, index):
... raise ValueError
>>> test(d, Unhashable())
Traceback (most recent call last):
...
ValueError
>>> test(None, 1) # doctest: +ELLIPSIS
Traceback (most recent call last):
...
TypeError: 'NoneType' object is ...
TypeError: ...subscriptable...
"""
return d[index]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment