From 70ba84dc485ed3db4ccf5008db87b2c9f003634b Mon Sep 17 00:00:00 2001 From: Jakub Roztocil Date: Mon, 28 Sep 2020 12:53:28 +0200 Subject: [PATCH] Fix fixture encoding on Windows --- tests/fixtures/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/fixtures/__init__.py b/tests/fixtures/__init__.py index 59faf348..e14ec209 100644 --- a/tests/fixtures/__init__.py +++ b/tests/fixtures/__init__.py @@ -23,9 +23,9 @@ JSON_FILE_PATH_ARG = patharg(JSON_FILE_PATH) # Strip because we don't want new lines in the data so that we can # easily count occurrences also when embedded in JSON (where the new # line would be escaped). -FILE_CONTENT = FILE_PATH.read_text().strip() +FILE_CONTENT = FILE_PATH.read_text('utf8').strip() -JSON_FILE_CONTENT = JSON_FILE_PATH.read_text() +JSON_FILE_CONTENT = JSON_FILE_PATH.read_text('utf8') BIN_FILE_CONTENT = BIN_FILE_PATH.read_bytes() UNICODE = FILE_CONTENT