Running ‘testthat.R’ [893s/507s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(IncidencePrevalence)
  > 
  > test_check("IncidencePrevalence")
  Starting 2 test processes
  [ FAIL 8 | WARN 3 | SKIP 71 | PASS 134 ]
  
  ══ Skipped tests (71) ══════════════════════════════════════════════════════════
  • On CRAN (71): 'test-benchmarkIncidencePrevalence.R:2:3',
    'test-estimatePrevalence.R:67:3', 'test-estimatePrevalence.R:124:3',
    'test-estimatePrevalence.R:244:3', 'test-estimatePrevalence.R:380:3',
    'test-estimatePrevalence.R:462:3', 'test-estimatePrevalence.R:607:3',
    'test-estimatePrevalence.R:658:3', 'test-estimatePrevalence.R:715:3',
    'test-estimatePrevalence.R:763:3', 'test-estimatePrevalence.R:787:3',
    'test-estimatePrevalence.R:812:3', 'test-estimatePrevalence.R:945:3',
    'test-estimatePrevalence.R:987:3', 'test-estimatePrevalence.R:1017:3',
    'test-estimatePrevalence.R:1098:3', 'test-estimatePrevalence.R:1150:3',
    'test-estimateIncidence.R:91:3', 'test-estimateIncidence.R:201:3',
    'test-estimateIncidence.R:273:3', 'test-estimateIncidence.R:374:3',
    'test-estimateIncidence.R:479:3', 'test-estimateIncidence.R:576:3',
    'test-estimateIncidence.R:744:3', 'test-estimateIncidence.R:853:3',
    'test-estimateIncidence.R:1008:3', 'test-estimateIncidence.R:1074:3',
    'test-estimateIncidence.R:1130:3', 'test-estimateIncidence.R:1219:3',
    'test-estimateIncidence.R:1394:3', 'test-estimateIncidence.R:1512:3',
    'test-estimateIncidence.R:1593:3', 'test-estimateIncidence.R:1703:3',
    'test-estimateIncidence.R:1809:3', 'test-estimateIncidence.R:1962:3',
    'test-estimateIncidence.R:2019:3', 'test-estimateIncidence.R:2209:3',
    'test-estimateIncidence.R:2407:3', 'test-estimateIncidence.R:2485:3',
    'test-estimateIncidence.R:2899:3', 'test-estimateIncidence.R:2940:3',
    'test-estimateIncidence.R:2989:3', 'test-estimateIncidence.R:3047:3',
    'test-mockIncidencePrevalenceRef.R:2:3',
    'test-mockIncidencePrevalenceRef.R:39:3',
    'test-mockIncidencePrevalenceRef.R:67:3',
    'test-mockIncidencePrevalenceRef.R:118:3',
    'test-mockIncidencePrevalenceRef.R:220:3', 'test-plotting.R:2:3',
    'test-plotting.R:105:3', 'test-plotting.R:160:3', 'test-plotting.R:211:3',
    'test-generateDenominatorCohortSet.R:138:3',
    'test-generateDenominatorCohortSet.R:185:3',
    'test-generateDenominatorCohortSet.R:289:3',
    'test-generateDenominatorCohortSet.R:325:3',
    'test-generateDenominatorCohortSet.R:581:3',
    'test-generateDenominatorCohortSet.R:799:3',
    'test-generateDenominatorCohortSet.R:842:3',
    'test-generateDenominatorCohortSet.R:894:3',
    'test-generateDenominatorCohortSet.R:978:3',
    'test-generateDenominatorCohortSet.R:1101:3',
    'test-generateDenominatorCohortSet.R:1165:3',
    'test-generateDenominatorCohortSet.R:1218:3',
    'test-generateDenominatorCohortSet.R:1276:3',
    'test-generateDenominatorCohortSet.R:1352:3',
    'test-generateDenominatorCohortSet.R:1473:3',
    'test-generateDenominatorCohortSet.R:1572:3',
    'test-generateDenominatorCohortSet.R:1623:3',
    'test-generateDenominatorCohortSet.R:1686:3',
    'test-generateDenominatorCohortSet.R:1905:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-benchmarkIncidencePrevalence.R:55:3'): check tables cleaned up ──
  Error in `omopgenerics::newSummarisedResult(x = prs, settings = dplyr::mutate(dplyr::select(analysisSettings, 
      !c("denominator_cohort_name", "outcome_cohort_name")), dplyr::across(-"result_id", 
      as.character)))`: Each `result_id` must be unique and contain a unique set of settings.
  Backtrace:
      ▆
   1. └─IncidencePrevalence::benchmarkIncidencePrevalence(cdm) at test-benchmarkIncidencePrevalence.R:55:3
   2.   └─IncidencePrevalence::estimatePointPrevalence(...)
   3.     └─IncidencePrevalence:::estimatePrevalence(...)
   4.       └─omopgenerics::newSummarisedResult(...)
   5.         └─omopgenerics:::validateSummarisedResult(x)
   6.           └─omopgenerics:::validateResultSettings(attr(x, "settings"), call = call)
   7.             └─cli::cli_abort(...)
   8.               └─rlang::abort(...)
  ── Failure ('test-estimatePrevalence.R:1202:3'): mock db: prevalence using strata vars ──
  visOmopResults::filterSettings(prev_orig, result_type == "prevalence") (`actual`) not equal to ... %>% ... (`expected`).
  
  attr(actual, 'settings') vs attr(expected, 'settings')
                                       strata
  - attr(actual, 'settings')[1, ]            
  + attr(expected, 'settings')[1, ] my_strata
  
  `attr(actual, 'settings')$strata`:   ""         
  `attr(expected, 'settings')$strata`: "my_strata"
  ── Failure ('test-estimateIncidence.R:3154:3'): mock db: incidence using strata vars ──
  visOmopResults::filterSettings(inc_orig, result_type == "incidence") (`actual`) not identical to ... %>% ... (`expected`).
  
  attr(actual, 'settings') vs attr(expected, 'settings')
                                       strata
  - attr(actual, 'settings')[1, ]            
  + attr(expected, 'settings')[1, ] my_strata
  
  `attr(actual, 'settings')$strata`:   ""         
  `attr(expected, 'settings')$strata`: "my_strata"
  ── Error ('test-tables.R:13:3'): test tables ───────────────────────────────────
  Error: 'optionsVisOmopTable' is not an exported object from 'namespace:visOmopResults'
  Backtrace:
      ▆
   1. └─IncidencePrevalence::tablePrevalence(prev_period, type = "gt") at test-tables.R:13:3
   2.   └─IncidencePrevalence:::tableInternal(...)
   3.     └─IncidencePrevalence:::defaultTableIncidencePrevalence(...)
  ── Failure ('test-tables.R:73:3'): test importing results ──────────────────────
  Expected `tablePrevalence(prev_period_imported, type = "gt")` to run without any errors.
  i Actually got a <simpleError> with text:
    'optionsVisOmopTable' is not an exported object from 'namespace:visOmopResults'
  ── Failure ('test-tables.R:91:3'): test importing results ──────────────────────
  Expected `tableIncidence(inc_imported, type = "tibble")` to run without any errors.
  i Actually got a <simpleError> with text:
    'optionsVisOmopTable' is not an exported object from 'namespace:visOmopResults'
  ── Failure ('test-tables.R:98:3'): test importing results ──────────────────────
  Expected `tableIncidence(results_imported)` to run without any errors.
  i Actually got a <simpleError> with text:
    'optionsVisOmopTable' is not an exported object from 'namespace:visOmopResults'
  ── Failure ('test-tables.R:99:3'): test importing results ──────────────────────
  Expected `tablePrevalence(results_imported)` to run without any errors.
  i Actually got a <simpleError> with text:
    'optionsVisOmopTable' is not an exported object from 'namespace:visOmopResults'
  
  [ FAIL 8 | WARN 3 | SKIP 71 | PASS 134 ]
  Error: Test failures
  Execution halted