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): ...@@ -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]
......
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