From 1b4efa3aa12e98871c65112a078479b43ede6800 Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Mon, 13 Jun 2022 19:15:25 -0700 Subject: [PATCH] Explicitly use utf-8 in `create_file` during tests This may help solve the current breakage on the Windows roller, which appears to be defaulting to the "charmap" codec that cannot encode a character used in the other.test_prejs_unicode test. --- tests/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/common.py b/tests/common.py index 80e138408956b..4c4fd1e7c351e 100644 --- a/tests/common.py +++ b/tests/common.py @@ -301,7 +301,7 @@ def create_file(name, contents, binary=False): if binary: name.write_bytes(contents) else: - name.write_text(contents) + name.write_text(contents, encoding='utf-8') def make_executable(name):