Skip to content
Snippets Groups Projects
Commit ea5dc2ca authored by Chris Lamb's avatar Chris Lamb :eyes:
Browse files

Avoid decoding strings by opening source files in binary mode.

parent 014908f0
No related branches found
No related tags found
No related merge requests found
......@@ -26,5 +26,5 @@ BASE_DIR = os.path.dirname(os.path.abspath(diffoscope.__file__))
def test_dos_mbr():
for x in glob.iglob(os.path.join(BASE_DIR, '**', '*.py'), recursive=True):
with open(x, encoding='utf-8', errors='replace') as f:
assert 'DOS/MBR' not in f.read()
with open(x, 'rb') as f:
assert b'DOS/MBR' not in f.read()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment