From 216682a4311beb324639e3e01d807fc52942bae8 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 4 Jul 2022 08:42:40 +0200 Subject: test: add explicit encoding to open --- test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test.py b/test.py index b7a18c8..0354407 100755 --- a/test.py +++ b/test.py @@ -92,13 +92,13 @@ def reset_state(state=None): def reset_state_string(string): - with open(os.environ["GSB_STATE_FILE"], "w") as f: + with open(os.environ["GSB_STATE_FILE"], "w", encoding='utf-8') as f: json.dump(json.loads(string), f) def compare_state(comp_state): - with open(comp_state, "r") as csf, \ - open(os.environ["GSB_STATE_FILE"], "r") as sf: + with open(comp_state, "r", encoding='utf-8') as csf, \ + open(os.environ["GSB_STATE_FILE", encoding='utf-8'], "r") as sf: cs = csf.read() s = sf.read() return cs == s -- cgit v1.2.3