def compare_text_files(self, file1, file2):
text1 = list(filter(None, map(str.rstrip, open(file1, '<STR_LIT>').readlines())))<EOL>text2 = list(filter(None, map(str.rstrip, open(file2, '<STR_LIT>').readlines())))<EOL>return '<STR_LIT>'.join(difflib.unified_diff(text1, text2))<EOL>
Compares two text files.
Removes whitespace, empty lines, and newline chars
Empty string as a return value mean file are the same
Open, read lines to string list, remove any newline chars, and
filter out empty strings/lines.