Use newline='' to avoid automatic newline translation

This commit is contained in:
Anthony Sottile 2016-05-26 11:45:28 -07:00
parent 4a01f64c8f
commit b4e29b5e63

View file

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