make doctests compatible with Python 3.3

This commit is contained in:
Stefan Kögl
2012-11-11 10:43:58 +01:00
parent 0babb1456d
commit 84f80db402

View File

@@ -112,14 +112,14 @@ def set_pointer(doc, pointer, value):
>>> pointer = JsonPointer('/bar')
>>> pointer.set(obj, 'one', '0')
>>> pointer.set(obj, 'two', '1')
>>> obj
{'foo': 2, 'bar': ['one', 'two']}
>>> obj == {'foo': 2, 'bar': ['one', 'two']}
True
>>> obj = {"foo": 2, "bar": []}
>>> pointer = JsonPointer('/bar')
>>> pointer.set(obj, 5, '0/x')
>>> obj
{'foo': 2, 'bar': [{'x': 5}]}
>>> obj == {'foo': 2, 'bar': [{'x': 5}]}
True
>>> obj = {'foo': 2, 'bar': [{'x': 5}]}
>>> pointer = JsonPointer('/bar/0')