import pywikidiff2 import json num_context_lines = 100000 obj = pywikidiff2.pywikidiff2() obj = pywikidiff2.pywikidiff2(numContextLines=num_context_lines, moved_paragraph_detection_cutoff=20000) assert obj.num_context_lines() == num_context_lines print(obj.moved_line_threshold()) print(obj.change_threshold()) print(obj.moved_paragraph_detection_cutoff()) print(obj.max_split_size()) print(obj.initial_split_threshold()) print(obj.final_split_threshold()) res = obj.inline_json_diff("help! \n I'm alive", "help! \n dead I am") print(res) res = obj.inline_json_diff(open("test/1285792388",'r').read(), open("test/1295229484",'r').read(), numContextLines=1000) res = obj.inline_json_diff("", open("test/1295229484_parmove_and_change",'r').read(), numContextLines=1000) print('\n') print(res) res = obj.inline_json_diff(open("test/1295229484",'r').read(), open("test/1295229484_parmove_and_change",'r').read()) res = json.loads(res) assert res["diff"][0]["type"] == 0