[scripts] ensure files use 'utf-8' encoding and '\n' newlines (#7872)
This commit is contained in:
@@ -71,7 +71,7 @@ def get_test_source(extr, *, cache={}):
|
||||
tests = cache[extr.__module__]
|
||||
except KeyError:
|
||||
path = sys.modules[extr.__module__].__file__
|
||||
with open(path) as fp:
|
||||
with util.open(path) as fp:
|
||||
lines = fp.readlines()
|
||||
tests = cache[extr.__module__] = extract_tests_from_source(lines)
|
||||
return tests.get(extr.url) or ("",)
|
||||
|
||||
Reference in New Issue
Block a user