Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.measure
Commits
3aec10ae
Commit
3aec10ae
authored
Sep 17, 2015
by
Manuel Günther
Browse files
Simplified binary file comparison
parent
352f5a2b
Changes
1
Hide whitespace changes
Inline
Side-by-side
bob/measure/test_io.py
View file @
3aec10ae
...
...
@@ -38,11 +38,7 @@ def test_load_scores():
def
_check_binary_identical
(
name1
,
name2
):
# see: http://www.peterbe.com/plog/using-md5-to-check-equality-between-files
import
sys
if
sys
.
version_info
[
0
]
==
2
:
from
md5
import
new
as
md5
else
:
from
hashlib
import
md5
from
hashlib
import
md5
# tests if two files are binary identical
with
open
(
name1
,
'rb'
)
as
f1
:
with
open
(
name2
,
'rb'
)
as
f2
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment