Skip to content

Commit

Permalink
There was probably a single site!
Browse files Browse the repository at this point in the history
  • Loading branch information
gvegayon committed Oct 25, 2024
1 parent a2522aa commit 34c9179
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/testthat/test_preprocess_ww_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -381,12 +381,15 @@ test_that("Function handles LOD values equal to concentration values", {
})

test_that("Constant population per site", {
wrong_pop <- ww_data
ww_data$site_pop <- 1e6 + seq_len(nrow(ww_data))
wrong_pop <- cbind(
ww_data,
ww_data |> dplyr::mutate(site = max(.data$site) + 1)
)
wrong_pop$site_pop <- 1e6 + seq_len(nrow(ww_data))

expect_error(
preprocess_ww_data(
ww_data,
wrong_pop,
conc_col_name = "conc",
lod_col_name = "lod"
),
Expand Down

0 comments on commit 34c9179

Please sign in to comment.