diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2022-07-04 08:42:40 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2022-07-04 08:42:40 +0200 |
| commit | 216682a4311beb324639e3e01d807fc52942bae8 (patch) | |
| tree | 2c93ba01bda235e49cbe98df44215c6e1f1fd50c | |
| parent | 27e9535d73a586930552661ffedee540004011f0 (diff) | |
| download | geldschieberbot-216682a4311beb324639e3e01d807fc52942bae8.tar.gz geldschieberbot-216682a4311beb324639e3e01d807fc52942bae8.zip | |
test: add explicit encoding to open
| -rwxr-xr-x | test.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |
