File tree Expand file tree Collapse file tree 1 file changed +18
-9
lines changed Expand file tree Collapse file tree 1 file changed +18
-9
lines changed Original file line number Diff line number Diff line change 11from packaging import version
2+ from time import sleep
23
34import numpy as np
45import pynwb
@@ -189,15 +190,23 @@ def test_check_none_matnwb_resolution_pass():
189190
190191 produced with MatNWB, when read with PyNWB~=2.0.1 and HDMF<=3.2.1 contains a resolution value of None.
191192 """
192- with pynwb .NWBHDF5IO (
193- path = "https://dandiarchive.s3.amazonaws.com/blobs/da5/107/da510761-653e-4b81-a330-9cdae4838180" ,
194- mode = "r" ,
195- load_namespaces = True ,
196- driver = "ros3" ,
197- ) as io :
198- nwbfile = io .read ()
199- time_series = nwbfile .processing ["video_files" ]["video" ].time_series ["20170203_KIB_01_s1.1.h264" ]
200- assert check_resolution (time_series ) is None
193+ max_retries = 10
194+ retries = 0
195+
196+ while retries < max_retries :
197+ try :
198+ retries += 1
199+ with pynwb .NWBHDF5IO (
200+ path = "https://dandiarchive.s3.amazonaws.com/blobs/da5/107/da510761-653e-4b81-a330-9cdae4838180" ,
201+ mode = "r" ,
202+ load_namespaces = True ,
203+ driver = "ros3" ,
204+ ) as io :
205+ nwbfile = io .read ()
206+ time_series = nwbfile .processing ["video_files" ]["video" ].time_series ["20170203_KIB_01_s1.1.h264" ]
207+ except OSError : # Cannot curl request
208+ sleep (0.1 * 2 ** retries )
209+ assert check_resolution (time_series ) is None
201210
202211
203212def test_check_resolution_fail ():
You can’t perform that action at this time.
0 commit comments