Specify encoding for "open()" functions

This commit is contained in:
Ivan Kravets
2021-08-28 13:10:07 +03:00
parent b9219a2b62
commit d819617d2b
28 changed files with 63 additions and 43 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ def test_download(isolated_pio_core):
lm.cleanup_expired_downloads()
assert not os.path.isfile(archive_path)
# check that key is deleted from DB
with open(lm.get_download_usagedb_path()) as fp:
with open(lm.get_download_usagedb_path(), encoding="utf8") as fp:
assert os.path.basename(archive_path) not in fp.read()