From b4e29b5e63e4cd93d4244e7a52f772a40f9a7772 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Thu, 26 May 2016 11:45:28 -0700 Subject: [PATCH] Use newline='' to avoid automatic newline translation --- testing/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/util.py b/testing/util.py index 3b90631..eacb637 100644 --- a/testing/util.py +++ b/testing/util.py @@ -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)