@@ -744,3 +744,43 @@ def test_position_numpy_array_from_via_tracks_file(via_file_path):
744744 bboxes_arrays ["position_array" ], # frames, xy, individuals
745745 np .stack (list_derived_centroids , axis = - 1 ),
746746 )
747+
748+
749+ @pytest .mark .skip (
750+ reason = (
751+ "Waiting on [PR #772](https://github.com/movement-project/movement/pull/772)"
752+ " to be reviewed and merged."
753+ )
754+ )
755+ @pytest .mark .benchmark
756+ @pytest .mark .parametrize (
757+ "via_file_path" ,
758+ [
759+ pytest .DATA_PATHS .get ("VIA_multiple-crabs_5-frames_labels.csv" ),
760+ pytest .DATA_PATHS .get ("VIA_single-crab_MOCA-crab-1.csv" ),
761+ ],
762+ )
763+ def test_benchmark_from_via_tracks_file (via_file_path , benchmark ):
764+ """Benchmark the loading of a VIA tracks .csv file."""
765+ benchmark (load_bboxes .from_via_tracks_file , via_file_path )
766+
767+
768+ @pytest .mark .skip (
769+ reason = (
770+ "Waiting on [PR #772](https://github.com/movement-project/movement/pull/772)"
771+ " to be reviewed and merged."
772+ )
773+ )
774+ @pytest .mark .benchmark
775+ @pytest .mark .parametrize (
776+ "via_file_path" ,
777+ [
778+ pytest .DATA_PATHS .get ("VIA_multiple-crabs_5-frames_labels.csv" ),
779+ # multiple crabs present in all 5 frames
780+ pytest .DATA_PATHS .get ("VIA_single-crab_MOCA-crab-1.csv" ),
781+ # single crab present in 35 non-consecutive frames
782+ ],
783+ )
784+ def test_benchmark_df_from_via_tracks_file (via_file_path , benchmark ):
785+ """Benchmark the `_df_from_via_tracks_file` function."""
786+ benchmark (load_bboxes ._df_from_via_tracks_file , via_file_path )
0 commit comments