Replace non utf8 errors properly in diff fuzzer

This commit is contained in:
Dave Halter
2020-04-06 02:04:48 +02:00
parent 556ce86cde
commit 561e81df00

View File

@@ -197,7 +197,7 @@ class FileModification:
class FileTests:
def __init__(self, file_path, test_count, change_count):
self._path = file_path
with open(file_path) as f:
with open(file_path, errors='replace') as f:
code = f.read()
self._code_lines = split_lines(code, keepends=True)
self._test_count = test_count