Created
October 2, 2015 08:30
-
-
Save curzona/ad5d45fc22bf07a13256 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def assert_file_equal(a, b): | |
a = open(a, "rb").read() | |
b = open(b, "rb").read() | |
if a != b: | |
diff = difflib.ndiff(a.splitlines(True), | |
b.splitlines(True)) | |
message = ''.join(diff) | |
raise AssertionError("Not equal:\n" + message) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment