-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mikkel Roald-Arbøl
committed
Dec 5, 2024
1 parent
6de77d9
commit f0a4bf6
Showing
9 changed files
with
64 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Test arguments | ||
|
||
# Paths to test data | ||
path_animalta_raw <- here::here("tests", "data", "animalta", "single_individual_multi_arena.csv") | ||
path_animalta_detailed <- here::here("tests", "data", "animalta", "variable_individuals_single_arena.csv") | ||
path_bonsai <- here::here("tests", "data", "bonsai", "LI850.csv") | ||
path_dlc_single <- here::here("tests", "data", "deeplabcut", "mouse_single.csv") | ||
path_dlc_multi <- here::here("tests", "data", "deeplabcut", "mouse_multi.csv") | ||
path_idtracker_csv <- here::here("tests", "data", "idtrackerai", "trajectories_csv", "trajectories.csv") | ||
path_idtracker_csv_probabilities <- here::here("tests", "data", "idtrackerai", "trajectories_csv", "id_probabilities.csv") | ||
path_lightningpose_single <- here::here("tests", "data", "lightningpose", "mouse_single.csv") | ||
path_lightningpose_twoview <- here::here("tests", "data", "lightningpose", "mouse_twoview.csv") | ||
path_trex <- here::here("tests", "data", "trex", "beetle.csv") | ||
|
||
# File headers (not including h5 files) | ||
test_that("Test output header names", { | ||
expect_no_error(ensure_file_has_headers(path_animalta_raw)) | ||
expect_no_error(ensure_file_has_headers(path_animalta_detailed)) | ||
expect_no_error(ensure_file_has_headers(path_bonsai)) | ||
expect_no_error(ensure_file_has_headers(path_dlc_single)) | ||
expect_no_error(ensure_file_has_headers(path_dlc_multi)) | ||
expect_no_error(ensure_file_has_headers(path_idtracker_csv)) | ||
expect_no_error(ensure_file_has_headers(path_lightningpose_single)) | ||
expect_no_error(ensure_file_has_headers(path_lightningpose_twoview)) | ||
expect_no_error(ensure_file_has_headers(path_trex)) | ||
}) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Test arguments | ||
|
||
# Paths to test data | ||
path_animalta_raw <- here::here("tests", "data", "animalta", "single_individual_multi_arena.csv") | ||
path_animalta_detailed <- here::here("tests", "data", "animalta", "variable_individuals_single_arena.csv") | ||
path_bonsai <- here::here("tests", "data", "bonsai", "LI850.csv") | ||
path_dlc_single <- here::here("tests", "data", "deeplabcut", "mouse_single.csv") | ||
path_dlc_multi <- here::here("tests", "data", "deeplabcut", "mouse_multi.csv") | ||
path_idtracker_h5 <- here::here("tests", "data", "idtrackerai", "trajectories.h5") | ||
path_idtracker_csv <- here::here("tests", "data", "idtrackerai", "trajectories_csv", "trajectories.csv") | ||
path_idtracker_csv_probabilities <- here::here("tests", "data", "idtrackerai", "trajectories_csv", "id_probabilities.csv") | ||
path_lightningpose_single <- here::here("tests", "data", "lightningpose", "mouse_single.csv") | ||
path_lightningpose_twoview <- here::here("tests", "data", "lightningpose", "mouse_twoview.csv") | ||
path_sleap_single <- here::here("tests", "data", "sleap", "SLEAP_single-mouse_EPM.analysis.h5") | ||
path_sleap_multi <- here::here("tests", "data", "sleap", "SLEAP_three-mice_Aeon_mixed-labels.analysis.h5") | ||
path_trex <- here::here("tests", "data", "trex", "beetle.csv") | ||
path_trackball_1 <- here::here("tests", "data", "single", "opticalflow_sensor_1.csv") | ||
path_trackball_2 <- here::here("tests", "data", "single", "opticalflow_sensor_2.csv") | ||
|
||
# Read file | ||
test_that("Read file", { | ||
expect_no_error(read_animalta(path_animalta_raw, detailed = FALSE)) | ||
expect_no_error(read_animalta(path_animalta_detailed, detailed = TRUE)) | ||
expect_error(read_animalta(path_animalta_raw, detailed = TRUE)) | ||
expect_error(read_animalta(path_animalta_detailed, detailed = FALSE)) | ||
expect_no_error(read_bonsai(path_bonsai)) | ||
expect_no_error(read_deeplabcut(path_dlc_single)) | ||
expect_no_error(read_deeplabcut(path_dlc_multi)) | ||
expect_no_error(read_idtracker(path_idtracker_csv)) | ||
expect_no_error(read_idtracker(path_idtracker_csv, path_idtracker_csv_probabilities)) | ||
expect_warning(read_idtracker(path_idtracker_h5, path_idtracker_csv_probabilities)) | ||
expect_no_error(read_idtracker(path_idtracker_h5)) | ||
expect_no_error(read_lightningpose(path_lightningpose_single)) | ||
expect_no_error(read_lightningpose(path_lightningpose_twoview)) | ||
expect_no_error(read_sleap(path_sleap_single)) | ||
expect_no_error(read_sleap(path_sleap_multi)) | ||
expect_no_error(read_trex(path_trex)) | ||
}) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.