Open files as UTF-8

This commit is contained in:
Michał Sochoń 2018-03-26 12:00:48 +02:00
parent 16ff195820
commit 54c0f8c937
6 changed files with 10 additions and 8 deletions

View file

@ -14,5 +14,5 @@ def get_resource_path(path):
def write_file(filename, contents):
"""Hax because coveragepy chokes on nested context managers."""
with io.open(filename, 'w', newline='') as file_obj:
with io.open(filename, 'w', encoding='UTF-8', newline='') as file_obj:
file_obj.write(contents)