diff options
| author | Stefan Kögl <stefan@skoegl.net> | 2013-04-13 23:05:36 +0200 |
|---|---|---|
| committer | Stefan Kögl <stefan@skoegl.net> | 2013-04-13 23:05:36 +0200 |
| commit | 31908848f394be98f0e63d296f68107df89346bc (patch) | |
| tree | 54c385f0ab826a055a2abcd0d542126e6781f892 /jsonpatch.py | |
| parent | dbb80f4bf9b872a552d1b5e1bf41382301f330c8 (diff) | |
| download | python-json-patch-31908848f394be98f0e63d296f68107df89346bc.tar.gz | |
use unicode literals and update tests
Diffstat (limited to 'jsonpatch.py')
| -rw-r--r-- | jsonpatch.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/jsonpatch.py b/jsonpatch.py index ca21384..e115273 100644 --- a/jsonpatch.py +++ b/jsonpatch.py @@ -30,6 +30,8 @@ # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # +from __future__ import unicode_literals + """ Apply JSON-Patches (RFC 6902) """ # Will be parsed by setup.py to determine package metadata @@ -87,10 +89,10 @@ def apply_patch(doc, patch, in_place=False): >>> other = apply_patch(doc, [{'op': 'add', 'path': '/baz', 'value': 'qux'}]) >>> doc is not other True - >>> other - {'foo': 'bar', 'baz': 'qux'} - >>> apply_patch(doc, [{'op': 'add', 'path': '/baz', 'value': 'qux'}], in_place=True) - {'foo': 'bar', 'baz': 'qux'} + >>> other == {'foo': 'bar', 'baz': 'qux'} + True + >>> apply_patch(doc, [{'op': 'add', 'path': '/baz', 'value': 'qux'}], in_place=True) == {'foo': 'bar', 'baz': 'qux'} + True >>> doc == other True """ |
