Add failing test for #40

This commit is contained in:
Stefan Kögl 2015-11-03 20:00:48 +01:00
parent 99bf6166a4
commit 2a02d21d7b
1 changed files with 7 additions and 0 deletions

View File

@ -359,6 +359,13 @@ class MakePatchTestCase(unittest.TestCase):
res = patch.apply(src)
self.assertEqual(res, dst)
def test_issue40(self):
""" Tests an issue in _split_by_common_seq reported in #40 """
src = [8, 7, 2, 1, 0, 9, 4, 3, 5, 6]
dest = [7, 2, 1, 0, 9, 4, 3, 6, 5, 8]
patch = jsonpatch.make_patch(src, dest)
class InvalidInputTests(unittest.TestCase):