Skip to content

Commit

Permalink
restyle
Browse files Browse the repository at this point in the history
  • Loading branch information
annakrystalli committed Apr 2, 2024
1 parent 0dec8a1 commit 6ff4dba
Showing 1 changed file with 44 additions and 36 deletions.
80 changes: 44 additions & 36 deletions tests/testthat/test-validate_submission.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ test_that("validate_submission works", {
expect_snapshot(
str(
validate_submission(hub_path,
file_path = "team1-goodmodel/2022-10-08-team1-goodmodel.csv",
skip_submit_window_check = TRUE,
skip_check_config = TRUE
file_path = "team1-goodmodel/2022-10-08-team1-goodmodel.csv",
skip_submit_window_check = TRUE,
skip_check_config = TRUE
)
)
)
expect_s3_class(
validate_submission(hub_path,
file_path = "team1-goodmodel/2022-10-08-team1-goodmodel.csv",
skip_submit_window_check = TRUE,
skip_check_config = TRUE
file_path = "team1-goodmodel/2022-10-08-team1-goodmodel.csv",
skip_submit_window_check = TRUE,
skip_check_config = TRUE
),
c("hub_validations", "list")
)
Expand All @@ -27,17 +27,17 @@ test_that("validate_submission works", {
expect_snapshot(
str(
validate_submission(hub_path,
file_path = "team1-goodmodel/2022-10-15-team1-goodmodel.csv",
skip_submit_window_check = TRUE,
skip_check_config = TRUE
file_path = "team1-goodmodel/2022-10-15-team1-goodmodel.csv",
skip_submit_window_check = TRUE,
skip_check_config = TRUE
)
)
)
expect_s3_class(
validate_submission(hub_path,
file_path = "team1-goodmodel/2022-10-15-team1-goodmodel.csv",
skip_submit_window_check = TRUE,
skip_check_config = TRUE
file_path = "team1-goodmodel/2022-10-15-team1-goodmodel.csv",
skip_submit_window_check = TRUE,
skip_check_config = TRUE
),
c("hub_validations", "list")
)
Expand All @@ -46,17 +46,17 @@ test_that("validate_submission works", {
expect_snapshot(
str(
validate_submission(hub_path,
file_path = "team1-goodmodel/2022-10-15-hub-baseline.csv",
skip_submit_window_check = TRUE,
skip_check_config = TRUE
file_path = "team1-goodmodel/2022-10-15-hub-baseline.csv",
skip_submit_window_check = TRUE,
skip_check_config = TRUE
)
)
)
expect_s3_class(
validate_submission(hub_path,
file_path = "team1-goodmodel/2022-10-15-hub-baseline.csv",
skip_submit_window_check = TRUE,
skip_check_config = TRUE
file_path = "team1-goodmodel/2022-10-15-hub-baseline.csv",
skip_submit_window_check = TRUE,
skip_check_config = TRUE
),
c("hub_validations", "list")
)
Expand All @@ -78,15 +78,15 @@ test_that("validate_submission works", {
expect_snapshot(
str(
validate_submission(hub_path,
file_path = "team1-goodmodel/2022-10-08-team1-goodmodel.csv",
skip_submit_window_check = TRUE
file_path = "team1-goodmodel/2022-10-08-team1-goodmodel.csv",
skip_submit_window_check = TRUE
)
)
)
expect_s3_class(
validate_submission(hub_path,
file_path = "team1-goodmodel/2022-10-08-team1-goodmodel.csv",
skip_submit_window_check = TRUE
file_path = "team1-goodmodel/2022-10-08-team1-goodmodel.csv",
skip_submit_window_check = TRUE
),
c("hub_validations", "list")
)
Expand All @@ -106,7 +106,7 @@ test_that("validate_submission submission within window works", {
expect_snapshot(
str(
validate_submission(hub_path,
file_path = "team1-goodmodel/2022-10-08-team1-goodmodel.csv"
file_path = "team1-goodmodel/2022-10-08-team1-goodmodel.csv"
)[["submission_time"]]
)
)
Expand All @@ -126,7 +126,7 @@ test_that("validate_submission submission outside window fails correctly", {
expect_snapshot(
str(
validate_submission(hub_path,
file_path = "team1-goodmodel/2022-10-08-team1-goodmodel.csv"
file_path = "team1-goodmodel/2022-10-08-team1-goodmodel.csv"
)[["submission_time"]]
)
)
Expand Down Expand Up @@ -162,33 +162,41 @@ test_that("validate_submission fails when csv cannot be parsed according to sche
test_that("File containing task ID with all null properties validate correctly", {
expect_snapshot(
str(
validate_submission(hub_path = test_path("testdata/hub-null"),
file_path = "team-model/2023-11-26-team-model.parquet",
skip_submit_window_check = TRUE)
validate_submission(
hub_path = test_path("testdata/hub-null"),
file_path = "team-model/2023-11-26-team-model.parquet",
skip_submit_window_check = TRUE
)
)
)
expect_true(
suppressMessages(
check_for_errors(
validate_submission(hub_path = test_path("testdata/hub-null"),
file_path = "team-model/2023-11-26-team-model.parquet",
skip_submit_window_check = TRUE)
validate_submission(
hub_path = test_path("testdata/hub-null"),
file_path = "team-model/2023-11-26-team-model.parquet",
skip_submit_window_check = TRUE
)
)
)
)
expect_snapshot(
str(
validate_submission(hub_path = test_path("testdata/hub-null"),
file_path = "team-model/2023-11-19-team-model.parquet",
skip_submit_window_check = TRUE)
validate_submission(
hub_path = test_path("testdata/hub-null"),
file_path = "team-model/2023-11-19-team-model.parquet",
skip_submit_window_check = TRUE
)
)
)
expect_true(
suppressMessages(
check_for_errors(
validate_submission(hub_path = test_path("testdata/hub-null"),
file_path = "team-model/2023-11-19-team-model.parquet",
skip_submit_window_check = TRUE)
validate_submission(
hub_path = test_path("testdata/hub-null"),
file_path = "team-model/2023-11-19-team-model.parquet",
skip_submit_window_check = TRUE
)
)
)
)
Expand Down

0 comments on commit 6ff4dba

Please sign in to comment.