force utf-8 encoding for python3.6

This commit is contained in:
Nathan Page 2020-10-25 16:33:05 -04:00
parent 6a50f1a123
commit fa63fb8d77
1 changed files with 2 additions and 2 deletions

View File

@ -5,11 +5,11 @@ def get_capture_text(*paths: str) -> str:
with open(
pathlib.Path(__file__).parent.joinpath("captures", *paths), mode="rb"
) as file:
return file.read().decode()
return file.read().decode("utf-8")
def set_capture_text(*paths: str, output: str) -> None:
with open(
pathlib.Path(__file__).parent.joinpath("captures", *paths), mode="wb"
) as file:
file.write(output.encode())
file.write(output.encode("utf-8"))