Specify encoding for "open()" functions

This commit is contained in:
Ivan Kravets committed 2021-08-28 13:10:07 +03:00
1 parent b9219a2b62
commit d819617d2b
28 files changed
+63 -43

No files matched your search

+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()