@@ -256,55 +256,63 @@ def test_on_load_clicked_without_file_path(make_napari_viewer_proxy, capsys):
256256
257257
258258@pytest .mark .parametrize (
259- "filename, source_software, tracks_array_shape, is_bbox" ,
259+ "filename, source_software, tracks_array_shape, is_bbox, expected_fps " ,
260260 [
261261 (
262262 "VIA_single-crab_MOCA-crab-1.csv" ,
263263 "VIA-tracks" ,
264264 (35 , 4 ),
265265 True ,
266+ 60.0 ,
266267 ), # single individual, no keypoints (bboxes)
267268 (
268269 "VIA_multiple-crabs_5-frames_labels.csv" ,
269270 "VIA-tracks" ,
270271 (430 , 4 ),
271272 True ,
273+ 60.0 ,
272274 ), # multiple individuals, no keypoints (bboxes)
273275 (
274276 "SLEAP_single-mouse_EPM.predictions.slp" ,
275277 "SLEAP" ,
276278 (110910 , 4 ),
277279 False ,
280+ 60.0 ,
278281 ), # single individual, multiple keypoints
279282 (
280283 "DLC_single-wasp.predictions.h5" ,
281284 "DeepLabCut" ,
282285 (2170 , 4 ),
283286 False ,
287+ 60.0 ,
284288 ), # single individual, multiple keypoints
285289 (
286290 "DLC_two-mice.predictions.csv" ,
287291 "DeepLabCut" ,
288292 (1439976 , 4 ),
289293 False ,
294+ 60.0 ,
290295 ), # two individuals, multiple keypoints
291296 (
292297 "SLEAP_three-mice_Aeon_mixed-labels.analysis.h5" ,
293298 "SLEAP" ,
294299 (1803 , 4 ),
295300 False ,
301+ 60.0 ,
296302 ), # three individuals, one keypoint
297303 (
298304 "MOVE_two-mice_octagon.analysis.nc" ,
299305 "movement (netCDF)" ,
300306 (126000 , 4 ),
301307 False ,
308+ 50.0 ,
302309 ),
303310 (
304311 "MOVE_single-crab_MOCA-crab-1_linear-interp.nc" ,
305312 "movement (netCDF)" ,
306313 (168 , 4 ),
307314 True ,
315+ 24.0 ,
308316 ),
309317 ],
310318)
@@ -313,6 +321,7 @@ def test_on_load_clicked_with_valid_file_path(
313321 source_software ,
314322 tracks_array_shape ,
315323 is_bbox ,
324+ expected_fps ,
316325 make_napari_viewer_proxy ,
317326 caplog ,
318327):
@@ -342,7 +351,7 @@ def test_on_load_clicked_with_valid_file_path(
342351 data_loader_widget ._on_load_clicked ()
343352
344353 # Check the class attributes from the input data
345- assert data_loader_widget .fps == 60
354+ assert data_loader_widget .fps == expected_fps
346355 assert data_loader_widget .source_software == source_software
347356 assert Path (data_loader_widget .file_path ) == file_path
348357 assert data_loader_widget .file_name == file_path .name
0 commit comments