diff --git a/tests/test_add.py b/tests/test_add.py index fc0db1a..a4281a1 100644 --- a/tests/test_add.py +++ b/tests/test_add.py @@ -79,6 +79,13 @@ def test_nested_append_1(self): ignore_patch=True, ) + def test_multiple_consecutive(self): + self.assertPatch( + [1, 2], + [1, 2, 3, 4], + [add("/2", 3), add("/3", 4)], + ) + class AddReplacesInDict(PatchTest): def test_value_to_none(self): diff --git a/tests/test_remove.py b/tests/test_remove.py index 6e75e57..8958161 100644 --- a/tests/test_remove.py +++ b/tests/test_remove.py @@ -49,6 +49,15 @@ def test_multiple(self): wrap_removed=False, ) + def test_multiple_consecutive(self): + self.assertPatch( + [1, 2, 3, 4], + [1, 2], + [remove("/3"), remove("/2")], + [4, 3], + wrap_removed=False, + ) + class RemoveRoot(PatchTest): def test_value(self):