Skip to content

Commit

Permalink
Merge pull request #220 from OHDSI/mah_fixIssues
Browse files Browse the repository at this point in the history
Add skip_on_cran() in tests
  • Loading branch information
martaalcalde authored Oct 31, 2024
2 parents 4941234 + 632168f commit aa73e5d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/testthat/test-summariseConceptCounts.R
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ test_that("summarise code use - eunomia", {
})

test_that("summarise code use - mock data", {
skip_on_cran()
person <- tibble::tibble(
person_id = c(1L,2L),
gender_concept_id = c(8532L,8507L),
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test-summariseObservationPeriod.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
test_that("check summariseObservationPeriod works", {
skip_on_cran()
# helper function
removeSettings <- function(x) {
attr(x, "settings") <- NULL
Expand Down Expand Up @@ -271,6 +272,7 @@ test_that("check summariseObservationPeriod works", {
})

test_that("check it works with mockOmopSketch", {
skip_on_cran()
cdm <- mockOmopSketch(numberIndividuals = 5, seed = 1)

sop <- summariseObservationPeriod(cdm$observation_period)
Expand Down Expand Up @@ -330,6 +332,7 @@ test_that("check it works with mockOmopSketch", {
})

test_that("check summariseObservationPeriod strata works", {
skip_on_cran()
# helper function
removeSettings <- function(x) {
attr(x, "settings") <- NULL
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-summariseOmopSnapshot.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ test_that("table omop snapshot works", {
})

test_that("works with mockOmopSketch",{
skip_on_cran()
cdm <- mockOmopSketch()
expect_no_error(x <- tableOmopSnapshot(summariseOmopSnapshot(cdm)))
expect_true(inherits(x,"gt_tbl"))
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-summariseRecordCount.R
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ test_that("summariseRecordCount() sex argument works", {
})

test_that("summariseRecordCount() works with mockOmopSketch", {
skip_on_cran()
cdm <- mockOmopSketch(numberIndividuals = 3, seed = 1)
conditionpp <- cdm$condition_occurrence |>
PatientProfiles::addDemographics(indexDate = "condition_start_date",ageGroup = list(c(0,20),c(21,150))) |>
Expand Down

0 comments on commit aa73e5d

Please sign in to comment.