Skip to content

Commit af3d98b

Browse files
authored
Explicitly use utf-8 in create_file during tests (#17211)
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.
1 parent 8c0fe77 commit af3d98b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ def create_file(name, contents, binary=False):
301301
if binary:
302302
name.write_bytes(contents)
303303
else:
304-
name.write_text(contents)
304+
name.write_text(contents, encoding='utf-8')
305305

306306

307307
def make_executable(name):

0 commit comments

Comments
 (0)