Skip to content

Commit

Permalink
test: list with multiple operations
Browse files Browse the repository at this point in the history
  • Loading branch information
wusteven815 committed Dec 17, 2024
1 parent f40d862 commit 7b82f82
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
9 changes: 9 additions & 0 deletions tests/test_remove.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 7b82f82

Please sign in to comment.