@@ -256,54 +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" ,
259+ "filename, source_software, tracks_array_shape, is_bbox " ,
260260 [
261261 (
262262 "VIA_single-crab_MOCA-crab-1.csv" ,
263263 "VIA-tracks" ,
264264 (35 , 4 ),
265+ True ,
265266 ), # single individual, no keypoints (bboxes)
266267 (
267268 "VIA_multiple-crabs_5-frames_labels.csv" ,
268269 "VIA-tracks" ,
269270 (430 , 4 ),
271+ True ,
270272 ), # multiple individuals, no keypoints (bboxes)
271273 (
272274 "SLEAP_single-mouse_EPM.predictions.slp" ,
273275 "SLEAP" ,
274276 (110910 , 4 ),
277+ False ,
275278 ), # single individual, multiple keypoints
276279 (
277280 "DLC_single-wasp.predictions.h5" ,
278281 "DeepLabCut" ,
279282 (2170 , 4 ),
283+ False ,
280284 ), # single individual, multiple keypoints
281285 (
282286 "DLC_two-mice.predictions.csv" ,
283287 "DeepLabCut" ,
284288 (1439976 , 4 ),
289+ False ,
285290 ), # two individuals, multiple keypoints
286291 (
287292 "SLEAP_three-mice_Aeon_mixed-labels.analysis.h5" ,
288293 "SLEAP" ,
289294 (1803 , 4 ),
295+ False ,
290296 ), # three individuals, one keypoint
291297 (
292298 "MOVE_two-mice_octagon.analysis.nc" ,
293299 "movement (netCDF)" ,
294300 (126000 , 4 ),
301+ False ,
295302 ),
296303 (
297304 "MOVE_single-crab_MOCA-crab-1_linear-interp.nc" ,
298305 "movement (netCDF)" ,
299- (0 , 0 ),
306+ (168 , 4 ),
307+ True ,
300308 ),
301309 ],
302310)
303311def test_on_load_clicked_with_valid_file_path (
304312 filename ,
305313 source_software ,
306314 tracks_array_shape ,
315+ is_bbox ,
307316 make_napari_viewer_proxy ,
308317 caplog ,
309318):
@@ -342,7 +351,8 @@ def test_on_load_clicked_with_valid_file_path(
342351 assert data_loader_widget .data is not None
343352 assert data_loader_widget .properties is not None
344353 assert data_loader_widget .data_not_nan is not None
345- if source_software in SUPPORTED_BBOXES_FILES :
354+ # if source_software in SUPPORTED_BBOXES_FILES:
355+ if is_bbox :
346356 assert data_loader_widget .data_bboxes is not None
347357 else :
348358 # Only bounding boxes datasets should add bboxes data
@@ -379,7 +389,8 @@ def test_on_load_clicked_with_valid_file_path(
379389 "Added tracked dataset as a napari Points layer." ,
380390 "Added tracked dataset as a napari Tracks layer." ,
381391 }
382- if source_software in SUPPORTED_BBOXES_FILES :
392+ # if source_software in SUPPORTED_BBOXES_FILES:
393+ if is_bbox :
383394 expected_log_messages .add (
384395 "Added tracked dataset as a napari Shapes layer."
385396 )
0 commit comments