Skip to content

Commit 51a49b0

Browse files
committed
Validate downloaded file integrity and raise ValueError on hash mismatch; used ./runtests.sh autofix
Signed-off-by: Enoch Mok <enochmokny@gmail.com>
1 parent 834a8b4 commit 51a49b0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/test_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"unexpected EOF", # incomplete download
8080
"network issue",
8181
"gdown dependency", # gdown not installed
82-
"hash check", # check hash value of downloaded file
82+
"hash check", # check hash value of downloaded file
8383
"limit", # HTTP Error 503: Egress is over the account limit
8484
"authenticate",
8585
"timed out", # urlopen error [Errno 110] Connection timed out
@@ -180,7 +180,7 @@ def skip_if_downloading_fails():
180180
err_str = str(rt_e)
181181
if any(k in err_str for k in DOWNLOAD_FAIL_MSGS):
182182
raise unittest.SkipTest(f"Error while downloading: {rt_e}") from rt_e # incomplete download
183-
183+
184184
raise rt_e
185185
except ValueError as v_e:
186186
if "hash check" in str(v_e):

0 commit comments

Comments
 (0)