python-json-patch
python-json-patch copied to clipboard
Add option to generate `test` operations in diff
Hi,
This PR adds a new option for generating patches - generate_test_ops - that adds a test operation before every remove and replace operation. This allows for generating patches that have stronger data integrity characteristics. It is also a useful option if you care about knowing what the data was pre-patch (this is important for our use-case). The flag defaults to False to keep the default behavior the same.
I have modified the test suite to run the MakePatchTestCase twice - once with generate_test_ops=True and once with generate_test_ops=False. Patches are still applying properly in both cases so I am confident that all is well.
Please let me know if there's anything else that needs to be done as part of this PR.
Thanks!
Hi, any news on this?
Hi, checking in on this. Is there anything that needs to be done to get this merged?