Running ‘spelling.R’
  Running ‘testthat.R’ [126s/183s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(PatientProfiles)
  > 
  > test_check("PatientProfiles")
  Starting 2 test processes
  [ FAIL 21 | WARN 0 | SKIP 104 | PASS 27 ]
  
  ══ Skipped tests (104) ═════════════════════════════════════════════════════════
  • On CRAN (104): 'test-addAttributes.R:2:3', 'test-addCategories.R:2:3',
    'test-addCategories.R:69:3', 'test-addCategories.R:106:3',
    'test-addCategories.R:155:3', 'test-addConceptIntersect.R:2:3',
    'test-addConceptIntersect.R:97:3', 'test-addConceptIntersect.R:138:3',
    'test-addConceptIntersect.R:168:3', 'test-addConceptIntersect.R:199:3',
    'test-addDeath.R:104:3', 'test-addDeath.R:149:3', 'test-addDeath.R:247:3',
    'test-addDeath.R:290:3', 'test-addCohortIntersect.R:277:3',
    'test-addCohortIntersect.R:353:3', 'test-addCohortIntersect.R:398:3',
    'test-addCohortIntersect.R:509:3', 'test-addCohortIntersect.R:600:3',
    'test-addCohortIntersect.R:660:3', 'test-addCohortIntersect.R:734:3',
    'test-addCohortIntersect.R:752:3', 'test-addCohortIntersect.R:838:3',
    'test-addFutureObservation.R:2:3', 'test-addFutureObservation.R:13:3',
    'test-addFutureObservation.R:27:3', 'test-addFutureObservation.R:87:3',
    'test-addFutureObservation.R:147:3', 'test-addFutureObservation.R:209:3',
    'test-addFutureObservation.R:253:3', 'test-addInObservation.R:2:3',
    'test-addInObservation.R:16:3', 'test-addInObservation.R:47:3',
    'test-addInObservation.R:170:3', 'test-addIntersect.R:2:3',
    'test-addIntersect.R:37:3', 'test-addIntersect.R:226:3',
    'test-addIntersect.R:277:3', 'test-addIntersect.R:398:3',
    'test-addIntersect.R:502:3', 'test-addIntersect.R:558:3',
    'test-addIntersect.R:626:3', 'test-addIntersect.R:775:3',
    'test-addIntersect.R:856:3', 'test-addIntersect.R:870:3',
    'test-addIntersect.R:940:3', 'test-addIntersect.R:1027:3',
    'test-addIntersect.R:1208:3', 'test-addIntersect.R:1219:3',
    'test-addObservationPeriodId.R:2:3', 'test-addPriorObservation.R:2:3',
    'test-addPriorObservation.R:13:3', 'test-addPriorObservation.R:27:3',
    'test-addPriorObservation.R:73:3', 'test-addPriorObservation.R:118:3',
    'test-addPriorObservation.R:180:3', 'test-addSex.R:2:3',
    'test-addSex.R:13:3', 'test-addSex.R:25:3', 'test-addSex.R:66:3',
    'test-addTableIntersect.R:28:3', 'test-addTableIntersect.R:209:3',
    'test-addTableIntersect.R:316:3', 'test-addTableIntersect.R:451:3',
    'test-addTableIntersect.R:581:3', 'test-checks.R:2:3', 'test-checks.R:106:3',
    'test-checks.R:157:3', 'test-checks.R:177:3', 'test-checks.R:189:3',
    'test-checks.R:237:3', 'test-checks.R:264:3', 'test-format.R:2:3',
    'test-format.R:89:3', 'test-format.R:100:3', 'test-format.R:110:3',
    'test-format.R:139:3', 'test-mockPatientProfiles.R:2:3', 'test-name.R:2:3',
    'test-addDemographics.R:2:3', 'test-addDemographics.R:24:3',
    'test-addDemographics.R:352:3', 'test-addDemographics.R:419:3',
    'test-addDemographics.R:685:3', 'test-addDemographics.R:834:3',
    'test-addDemographics.R:852:3', 'test-addDemographics.R:964:3',
    'test-addDemographics.R:1043:3', 'test-addDemographics.R:1155:3',
    'test-addDemographics.R:1220:3', 'test-addDemographics.R:1246:3',
    'test-addDemographics.R:1273:3', 'test-addDemographics.R:1289:3',
    'test-addDemographics.R:1300:3', 'test-addDemographics.R:1318:3',
    'test-addDemographics.R:1346:3', 'test-utilities.R:2:3',
    'test-summariseResult.R:205:3', 'test-summariseResult.R:251:3',
    'test-summariseResult.R:308:3', 'test-summariseResult.R:352:3',
    'test-summariseResult.R:373:3', 'test-summariseResult.R:448:3',
    'test-summariseResult.R:534:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-addConceptIntersect.R:243:3'): records out of observation ──────
  Error: 'cdm_from_con' is not an exported object from 'namespace:CDMConnector'
  Backtrace:
      ▆
   1. └─PatientProfiles::mockPatientProfiles(con = connection(), writeSchema = writeSchema()) at test-addConceptIntersect.R:243:3
  ── Error ('test-addDeath.R:2:3'): addDeathDate ─────────────────────────────────
  Error: 'cdm_from_con' is not an exported object from 'namespace:CDMConnector'
  Backtrace:
      ▆
   1. └─PatientProfiles::mockPatientProfiles(...) at test-addDeath.R:2:3
  ── Error ('test-addCohortIntersect.R:6:3'): output format - one outcome cohort ──
  Error: 'cdm_from_con' is not an exported object from 'namespace:CDMConnector'
  Backtrace:
      ▆
   1. └─PatientProfiles::mockPatientProfiles(...) at test-addCohortIntersect.R:6:3
  ── Error ('test-addCohortIntersect.R:97:3'): first vs last event - cohort table ──
  Error: 'cdm_from_con' is not an exported object from 'namespace:CDMConnector'
  Backtrace:
      ▆
   1. └─PatientProfiles::mockPatientProfiles(...) at test-addCohortIntersect.R:97:3
  ── Error ('test-addCohortIntersect.R:212:3'): multiple cohort entries per person ──
  Error: 'cdm_from_con' is not an exported object from 'namespace:CDMConnector'
  Backtrace:
      ▆
   1. └─PatientProfiles::mockPatientProfiles(...) at test-addCohortIntersect.R:212:3
  ── Error ('test-addInObservation.R:60:3'): addInObservation, window ────────────
  Error: 'cdm_from_con' is not an exported object from 'namespace:CDMConnector'
  Backtrace:
      ▆
   1. └─PatientProfiles::mockPatientProfiles(...) at test-addInObservation.R:60:3
  ── Error ('test-addObservationPeriodId.R:193:3'): check when there is the same record in multiple cohorts ──
  Error: 'cdm_from_con' is not an exported object from 'namespace:CDMConnector'
  Backtrace:
      ▆
   1. └─PatientProfiles::mockPatientProfiles(...) at test-addObservationPeriodId.R:193:3
  ── Error ('test-addTableIntersect.R:2:3'): basic structures ────────────────────
  Error: 'cdm_from_con' is not an exported object from 'namespace:CDMConnector'
  Backtrace:
      ▆
   1. └─PatientProfiles::mockPatientProfiles(con = connection(), writeSchema = writeSchema()) at test-addTableIntersect.R:2:3
  ── Error ('test-addTableIntersect.R:162:3'): addTableIntersectCount example ────
  Error: 'cdm_from_con' is not an exported object from 'namespace:CDMConnector'
  Backtrace:
      ▆
   1. └─PatientProfiles::mockPatientProfiles(...) at test-addTableIntersect.R:162:3
  ── Error ('test-class.R:19:3'): test class consistency across cohort operations ──
  Error: 'cdm_from_con' is not an exported object from 'namespace:CDMConnector'
  Backtrace:
      ▆
   1. └─PatientProfiles::mockPatientProfiles(...) at test-class.R:19:3
  ── Error ('test-addDemographics.R:45:3'): addDemographics, cohort and condition_occurrence ──
  Error: 'cdm_from_con' is not an exported object from 'namespace:CDMConnector'
  Backtrace:
      ▆
   1. └─PatientProfiles::mockPatientProfiles(...) at test-addDemographics.R:45:3
  ── Error ('test-addDemographics.R:84:3'): addDemographics, parameters ──────────
  Error: 'cdm_from_con' is not an exported object from 'namespace:CDMConnector'
  Backtrace:
      ▆
   1. └─PatientProfiles::mockPatientProfiles(...) at test-addDemographics.R:84:3
  ── Error ('test-addDemographics.R:149:3'): partial demographics - cohorts ──────
  Error: 'cdm_from_con' is not an exported object from 'namespace:CDMConnector'
  Backtrace:
      ▆
   1. └─PatientProfiles::mockPatientProfiles(...) at test-addDemographics.R:149:3
  ── Error ('test-addDemographics.R:252:3'): partial demographics - omop tables ──
  Error: 'cdm_from_con' is not an exported object from 'namespace:CDMConnector'
  Backtrace:
      ▆
   1. └─PatientProfiles::mockPatientProfiles(...) at test-addDemographics.R:252:3
  ── Error ('test-addDemographics.R:324:3'): priorObservation and future_observation - outside of observation period ──
  Error: 'cdm_from_con' is not an exported object from 'namespace:CDMConnector'
  Backtrace:
      ▆
   1. └─PatientProfiles::mockPatientProfiles(...) at test-addDemographics.R:324:3
  ── Error ('test-addDemographics.R:540:3'): age at cohort end, no missing, check age computation ──
  Error: 'cdm_from_con' is not an exported object from 'namespace:CDMConnector'
  Backtrace:
      ▆
   1. └─PatientProfiles::mockPatientProfiles(...) at test-addDemographics.R:540:3
  ── Error ('test-addDemographics.R:602:3'): age at cohort entry, missing year/month/day of birth ──
  Error: 'cdm_from_con' is not an exported object from 'namespace:CDMConnector'
  Backtrace:
      ▆
   1. └─PatientProfiles::mockPatientProfiles(...) at test-addDemographics.R:602:3
  ── Error ('test-addDemographics.R:655:3'): multiple cohortIds, check age at cohort end ──
  Error: 'cdm_from_con' is not an exported object from 'namespace:CDMConnector'
  Backtrace:
      ▆
   1. └─PatientProfiles::mockPatientProfiles(...) at test-addDemographics.R:655:3
  ── Error ('test-addDemographics.R:1365:3'): test query functions ───────────────
  Error: 'cdm_from_con' is not an exported object from 'namespace:CDMConnector'
  Backtrace:
      ▆
   1. └─PatientProfiles::mockPatientProfiles(con = connection(), writeSchema = writeSchema()) at test-addDemographics.R:1365:3
  ── Error ('test-summariseResult.R:87:3'): groups and strata ────────────────────
  Error: 'cdm_from_con' is not an exported object from 'namespace:CDMConnector'
  Backtrace:
      ▆
   1. └─PatientProfiles::mockPatientProfiles(...) at test-summariseResult.R:87:3
  ── Error ('test-summariseResult.R:166:3'): table in db or local ────────────────
  Error: 'cdm_from_con' is not an exported object from 'namespace:CDMConnector'
  Backtrace:
      ▆
   1. └─PatientProfiles::mockPatientProfiles(...) at test-summariseResult.R:166:3
  
  [ FAIL 21 | WARN 0 | SKIP 104 | PASS 27 ]
  Error: Test failures
  Execution halted