From e64987174866ef371f4df048d212eeba4f1a0013 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20K=C3=B6gl?= Date: Sun, 10 Sep 2017 19:23:50 +0200 Subject: Remove trailing whitespace --- jsonpatch.py | 4 ++-- tests.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jsonpatch.py b/jsonpatch.py index b1c56d0..cee4820 100644 --- a/jsonpatch.py +++ b/jsonpatch.py @@ -176,10 +176,10 @@ def make_patch(src, dst): # fix when patch with optimization is incorrect patch = JsonPatch.from_diff(src, dst) try: - new = patch.apply(src) + new = patch.apply(src) except JsonPatchConflict: # see TODO return JsonPatch.from_diff(src, dst, False) - + if new != dst: return JsonPatch.from_diff(src, dst, False) diff --git a/tests.py b/tests.py index 78b06f5..39f3a85 100755 --- a/tests.py +++ b/tests.py @@ -376,7 +376,7 @@ class MakePatchTestCase(unittest.TestCase): patch = jsonpatch.make_patch(old, new) new_from_patch = jsonpatch.apply_patch(old, patch) self.assertEqual(new, new_from_patch) - + def test_arrays_one_element_sequences(self): """ Tests the case of multiple common one element sequences inside an array """ # see https://github.com/stefankoegl/python-json-patch/issues/30#issuecomment-155070128 -- cgit v1.2.1