Skip to content

Commit

Permalink
fixed MD5 test to also work if test file has with crlf endings
Browse files Browse the repository at this point in the history
  • Loading branch information
moltob authored and schettino72 committed Nov 9, 2017
1 parent 8e7405d commit 1a1c717
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/test_dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ def test_unicode_md5():

def test_md5():
filePath = os.path.join(os.path.dirname(__file__), "sample_md5.txt")
# result got using command line md5sum
expected = "45d1503cb985898ab5bd8e58973007dd"
assert expected == get_file_md5(filePath)
# result got using command line md5sum, with different line-endings to deal with different GIT
# configurations:
expected_lf = "45d1503cb985898ab5bd8e58973007dd"
expected_crlf = "cf7b48b2fec3b581b135f7c9a1f7ae04"
assert get_file_md5(filePath) in {expected_lf, expected_crlf}


def test_sqlite_import():
Expand Down

0 comments on commit 1a1c717

Please sign in to comment.