def get_diff_text(old, new, filename):
newline = '<STR_LIT:\n>'<EOL>diff = difflib.unified_diff(<EOL>old, new,<EOL>'<STR_LIT>' + filename,<EOL>'<STR_LIT>' + filename,<EOL>lineterm=newline)<EOL>text = '<STR_LIT>'<EOL>for line in diff:<EOL><INDENT>text += line<EOL>if not line.endswith(newline):<EOL><INDENT>text += newline + r'<STR_LIT>' + newline<EOL><DEDENT><DEDENT>return text<EOL>
Return text of unified diff between old and new.