summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Shorin <kxepal@apache.org>2013-11-12 12:44:41 +0400
committerAlexander Shorin <kxepal@apache.org>2013-11-12 12:44:41 +0400
commit0c4ec87ced2ab50364f23b90c67637473a017903 (patch)
tree63518344848db041d5134924feec4690e7ea303a
parented65618d8233be5333d8fd26621d24a0d5d8ac7e (diff)
downloadpython-json-patch-0c4ec87ced2ab50364f23b90c67637473a017903.tar.gz
Fix equality tests for Python 3.x
Since map() returns generator in 3.x, it's not possible to compare them without unwrap.
-rw-r--r--jsonpatch.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/jsonpatch.py b/jsonpatch.py
index 5b7c86f..c614666 100644
--- a/jsonpatch.py
+++ b/jsonpatch.py
@@ -328,7 +328,7 @@ class JsonPatch(object):
@property
def _ops(self):
- return map(self._get_operation, self.patch)
+ return tuple(map(self._get_operation, self.patch))
def apply(self, obj, in_place=False):
"""Applies the patch to given object.