Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean test files #30

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions tests/testthat/test-sim_contacts.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ test_that("sim_contacts works as expected", {
)
})






test_that("sim_contacts works as expected with modified config", {
set.seed(1)
contacts <- sim_contacts(
Expand Down
22 changes: 11 additions & 11 deletions tests/testthat/test-sim_linelist.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ suppressMessages({
)
})

test_that("sim_list works as expected", {
test_that("sim_linelist works as expected", {
set.seed(1)
linelist <- sim_linelist(
R = 1.1,
Expand All @@ -42,7 +42,7 @@ test_that("sim_list works as expected", {
)
})

test_that("sim_list works as expected with age-strat rates", {
test_that("sim_linelist works as expected with age-strat rates", {
age_dep_hosp_rate <- data.frame(
age_limit = c(1, 5, 80),
rate = c(0.1, 0.05, 0.2)
Expand Down Expand Up @@ -78,7 +78,7 @@ test_that("sim_list works as expected with age-strat rates", {
)
})

test_that("sim_list works as expected with Ct", {
test_that("sim_linelist works as expected with Ct", {
set.seed(1)
linelist <- sim_linelist(
R = 1.1,
Expand All @@ -100,7 +100,7 @@ test_that("sim_list works as expected with Ct", {
)
})

test_that("sim_list works as expected with anonymous", {
test_that("sim_linelist works as expected with anonymous", {
set.seed(1)
linelist <- sim_linelist(
R = 1.1,
Expand All @@ -122,7 +122,7 @@ test_that("sim_list works as expected with anonymous", {
)
})

test_that("sim_list works as expected with age structure", {
test_that("sim_linelist works as expected with age structure", {
age_struct <- data.frame(
age_range = c("1-4", "5-79", "80-90"),
proportion = c(0.1, 0.7, 0.2),
Expand All @@ -149,7 +149,7 @@ test_that("sim_list works as expected with age structure", {
)
})

test_that("sim_list works as expected with age-strat rates & age structure", {
test_that("sim_linelist works as expected with age-strat rates & age struct", {
age_dep_hosp_rate <- data.frame(
age_limit = c(1, 5, 80),
rate = c(0.1, 0.05, 0.2)
Expand Down Expand Up @@ -181,7 +181,7 @@ test_that("sim_list works as expected with age-strat rates & age structure", {
)
})

test_that("sim_list gives expected proportion of ages with age structure", {
test_that("sim_linelist gives expected proportion of ages with age struct", {
age_struct <- data.frame(
age_range = c("1-4", "5-79", "80-90"),
proportion = c(0.2, 0.5, 0.3),
Expand Down Expand Up @@ -215,7 +215,7 @@ test_that("sim_list gives expected proportion of ages with age structure", {
)
})

test_that("sim_list works as expected with modified config", {
test_that("sim_linelist works as expected with modified config", {
set.seed(1)
linelist <- sim_linelist(
R = 1.1,
Expand All @@ -240,7 +240,7 @@ test_that("sim_list works as expected with modified config", {
)
})

test_that("sim_list works as expected with modified config parameters", {
test_that("sim_linelist works as expected with modified config parameters", {
set.seed(1)
linelist <- sim_linelist(
R = 1.1,
Expand All @@ -264,7 +264,7 @@ test_that("sim_list works as expected with modified config parameters", {
)
})

test_that("sim_list fails as expected with modified config", {
test_that("sim_linelist fails as expected with modified config", {
expect_error(
sim_linelist(
R = 1.1,
Expand Down Expand Up @@ -293,7 +293,7 @@ test_that("sim_list fails as expected with modified config", {
)
})

test_that("sim_list fails as expected with empty config", {
test_that("sim_linelist fails as expected with empty config", {
expect_error(
sim_linelist(
R = 1.1,
Expand Down