Skip to content
Snippets Groups Projects
Verified Commit aca61db5 authored by Mattia Rizzolo's avatar Mattia Rizzolo
Browse files

tests: test_dos_mbr: explicitly use utf8 for reading files


Obviously, UnicodeDecodeErrors are right behind you.

Gbp-Dch: Ignore
Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mattia@debian.org>
parent 934dfffb
No related branches found
No related tags found
No related merge requests found
......@@ -26,4 +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):
assert 'DOS/MBR' not in open(x).read()
with open(x, encoding='utf-8', errors='replace') as f:
assert '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