Skip to content

Commit c348cd4

Browse files
committed
fixed handling of skipped downloads in --head_precheck
1 parent 2582bf6 commit c348cd4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/downloads.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def test_downloads(self):
5858
sub_keys = list(clir_dlc[top_key].keys())
5959
for sub_key in random.sample(sub_keys, 10):
6060
res = self._test_download(clir_dlc[top_key][sub_key], f'clirmatrix/{top_key}/{sub_key}')
61-
if res['status'] != 'HEAD_SKIP':
61+
if res['result'] != 'HEAD_SKIP':
6262
self.output_data.append(res)
6363
finally:
6464
if self.output_path is not None:
@@ -69,7 +69,9 @@ def _test_download_iter(self, data, prefix=''):
6969
with tmp_environ(IR_DATASETS_DL_TRIES='10'): # give the test up to 10 attempts to download
7070
if 'url' in data and 'expected_md5' in data:
7171
if self.dlc_filter is None or re.search(self.dlc_filter, prefix) and not data.get('skip_test', False) and not data.get('auth', False):
72-
self.output_data.append(self._test_download(data, prefix))
72+
res = self._test_download(data, prefix)
73+
if res['result'] != 'HEAD_SKIP':
74+
self.output_data.append(res)
7375
elif 'instructions' in data:
7476
pass
7577
else:

0 commit comments

Comments
 (0)