Skip to content

Commit 0c4ec87

Browse files
committed
Fix equality tests for Python 3.x
Since map() returns generator in 3.x, it's not possible to compare them without unwrap.
1 parent ed65618 commit 0c4ec87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jsonpatch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ def to_string(self):
328328

329329
@property
330330
def _ops(self):
331-
return map(self._get_operation, self.patch)
331+
return tuple(map(self._get_operation, self.patch))
332332

333333
def apply(self, obj, in_place=False):
334334
"""Applies the patch to given object.

0 commit comments

Comments
 (0)