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
......@@ -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()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment