Skip to content

Commit

Permalink
clean warnings in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nmercadeb committed Dec 19, 2024
1 parent 0e42bdb commit 2443e25
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/requireCohortIntersect.R
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ requireCohortIntersect <- function(cohort,
) |
(!.data$cohort_definition_id %in% .env$cohortId)
) |>
dplyr::select(cols) |>
dplyr::select(dplyr::all_of(cols)) |>
dplyr::compute(name = subsetName, temporary = FALSE)

# attrition reason
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-requireConceptIntersect.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ test_that("require flag in concept", {
# only support one concept at the moment
expect_error(
requireConceptIntersect(cohort = cdm$cohort1,
conceptSet = list(a = 1, b = 2),
conceptSet = list(a = 1L, b = 2L),
window = c(-Inf, Inf))
)
expect_error(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-requireDemographics.R
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ test_that("codelist kept with >1 requirement", {

cdm <- cdm_local |> copyCdm()

cdm$cohort1 <- conceptCohort(cdm = cdm, conceptSet = list(a = 1, b = 2), name = "cohort1")
cdm$cohort1 <- conceptCohort(cdm = cdm, conceptSet = list(a = 1L, b = 2L), name = "cohort1")

cdm$cohort2 <- cdm$cohort1 |> requireDemographics(name = "cohort2", minPriorObservation = c(0,3), cohortId = 1)
expect_equal(attr(cdm$cohort2, "cohort_codelist") |> dplyr::collect() |> dplyr::arrange(.data$cohort_definition_id), dplyr::tibble(
Expand Down

0 comments on commit 2443e25

Please sign in to comment.