mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-09 06:04:54 +08:00
Replace non utf8 errors properly in diff fuzzer
This commit is contained in:
@@ -197,7 +197,7 @@ class FileModification:
|
|||||||
class FileTests:
|
class FileTests:
|
||||||
def __init__(self, file_path, test_count, change_count):
|
def __init__(self, file_path, test_count, change_count):
|
||||||
self._path = file_path
|
self._path = file_path
|
||||||
with open(file_path) as f:
|
with open(file_path, errors='replace') as f:
|
||||||
code = f.read()
|
code = f.read()
|
||||||
self._code_lines = split_lines(code, keepends=True)
|
self._code_lines = split_lines(code, keepends=True)
|
||||||
self._test_count = test_count
|
self._test_count = test_count
|
||||||
|
|||||||
Reference in New Issue
Block a user