From 31908848f394be98f0e63d296f68107df89346bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20K=C3=B6gl?= Date: Sat, 13 Apr 2013 23:05:36 +0200 Subject: use unicode literals and update tests --- jsonpatch.py | 10 ++++++---- tests.py | 2 ++ 2 files changed, 8 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 """ diff --git a/tests.py b/tests.py index 8b51987..d6506e1 100755 --- a/tests.py +++ b/tests.py @@ -1,6 +1,8 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +from __future__ import unicode_literals + import doctest import unittest import jsonpatch -- cgit v1.2.1