Running ‘testthat.R’ [208s/528s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(DrugExposureDiagnostics)
  > 
  > test_check("DrugExposureDiagnostics")
  trying URL 'https://raw.githubusercontent.com/darwin-eu/EunomiaDatasets/main/datasets/GiBleed/GiBleed_5.3.zip'
  Content type 'application/zip' length 6848518 bytes (6.5 MB)
  ==================================================
  downloaded 6.5 MB
  
  attempting to extract and load /tmp/RtmpHNg8ng/working_dir/Rtmp5weJQY/GiBleed_5.3.zip
  Progress: getting descendant concepts of ingredient (1125315) used in database
  Progress: getting descendant concepts of ingredient
  Progress: adding drug strength info
  Progress: limiting to concepts in the db
  Progress: adding concept names
  Overall time taken: 0 minutes and 3 seconds
  Time taken: 0 minutes and 3 seconds
  Progress: getting drug strength for ingredient
  Time taken: 0 minutes and 0 seconds
  Progress: getting drug records for ingredient
  Time taken: 0 minutes and 0 seconds
  Progress: get concepts used
  Time taken: 0 minutes and 1 seconds
  Progress: get ingredient overview
  Time taken: 0 minutes and 2 seconds
  Progress: sampling drug records
  population after earliestStartDate smaller than sample, ignoring date for sampling
  Time taken: 0 minutes and 4 seconds
  Progress: check drugsMissing
  Time taken: 0 minutes and 11 seconds
  Progress: check ExposureDuration
  Time taken: 0 minutes and 1 seconds
  Progress: check drugTypes
  Time taken: 0 minutes and 1 seconds
  Progress: check drugRoutes
  Time taken: 0 minutes and 1 seconds
  Progress: check drugSourceConcepts
  Time taken: 0 minutes and 2 seconds
  Progress: check drugDaysSupply
  Time taken: 0 minutes and 0 seconds
  Progress: check drugVerbatimEndDate
  Time taken: 0 minutes and 4 seconds
  Progress: check drugDose
  Time taken: 0 minutes and 1 seconds
  Progress: check drugSig
  Time taken: 0 minutes and 1 seconds
  Progress: check drugQuantity
  Time taken: 0 minutes and 0 seconds
  Progress: create histograms
  Time taken: 0 minutes and 0 seconds
  Finished
  population after earliestStartDate smaller than sample, ignoring date for sampling
  population after earliestStartDate smaller than sample, ignoring date for sampling
  population after earliestStartDate smaller than sample, ignoring date for sampling
  Time taken: 0 minutes and 0 seconds
  testMessage
  [ FAIL 23 | WARN 0 | SKIP 1 | PASS 102 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • Sys.getenv("TESTDB_USER") == "" is TRUE (1)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-CheckDrugSig.R:15:3'): checkDrugSig overall ────────────────────
  Error in `CDMConnector::cdm_from_con(db, cdm_tables = c("concept_ancestor", 
      "concept_relationship", "concept", "drug_strength", "drug_exposure"))`: unused argument (cdm_tables = c("concept_ancestor", "concept_relationship", "concept", "drug_strength", "drug_exposure"))
  Backtrace:
      ▆
   1. └─DrugExposureDiagnostics (local) getTestData() at test-CheckDrugSig.R:15:2
   2.   └─DrugExposureDiagnostics:::mockDrugExposure(drug_exposure = drug_exposure) at test-CheckDrugSig.R:11:2
  ── Error ('test-CheckDrugSig.R:25:3'): checkDrugSig byConcept ──────────────────
  Error in `CDMConnector::cdm_from_con(db, cdm_tables = c("concept_ancestor", 
      "concept_relationship", "concept", "drug_strength", "drug_exposure"))`: unused argument (cdm_tables = c("concept_ancestor", "concept_relationship", "concept", "drug_strength", "drug_exposure"))
  Backtrace:
      ▆
   1. └─DrugExposureDiagnostics (local) getTestData() at test-CheckDrugSig.R:25:2
   2.   └─DrugExposureDiagnostics:::mockDrugExposure(drug_exposure = drug_exposure) at test-CheckDrugSig.R:11:2
  ── Error ('test-CheckVerbatimEndDate.R:22:3'): checkVerbatimEndDate overall ────
  Error in `CDMConnector::cdm_from_con(db, cdm_tables = c("concept_ancestor", 
      "concept_relationship", "concept", "drug_strength", "drug_exposure"))`: unused argument (cdm_tables = c("concept_ancestor", "concept_relationship", "concept", "drug_strength", "drug_exposure"))
  Backtrace:
      ▆
   1. └─DrugExposureDiagnostics (local) getTestData() at test-CheckVerbatimEndDate.R:22:2
   2.   └─DrugExposureDiagnostics:::mockDrugExposure(drug_exposure = drug_exposure) at test-CheckVerbatimEndDate.R:18:2
  ── Error ('test-CheckVerbatimEndDate.R:34:3'): checkVerbatimEndDate byConcept ──
  Error in `CDMConnector::cdm_from_con(db, cdm_tables = c("concept_ancestor", 
      "concept_relationship", "concept", "drug_strength", "drug_exposure"))`: unused argument (cdm_tables = c("concept_ancestor", "concept_relationship", "concept", "drug_strength", "drug_exposure"))
  Backtrace:
      ▆
   1. └─DrugExposureDiagnostics (local) getTestData() at test-CheckVerbatimEndDate.R:34:2
   2.   └─DrugExposureDiagnostics:::mockDrugExposure(drug_exposure = drug_exposure) at test-CheckVerbatimEndDate.R:18:2
  ── Error ('test-DrugRecordChecks.R:42:3'): summariseDrugExposureDuration test ──
  Error in `CDMConnector::cdm_from_con(db, cdm_tables = c("concept_ancestor", 
      "concept_relationship", "concept", "drug_strength", "drug_exposure"))`: unused argument (cdm_tables = c("concept_ancestor", "concept_relationship", "concept", "drug_strength", "drug_exposure"))
  Backtrace:
      ▆
   1. └─DrugExposureDiagnostics (local) getTestData() at test-DrugRecordChecks.R:42:2
   2.   └─DrugExposureDiagnostics:::mockDrugExposure(drug_exposure = drug_exposure) at test-DrugRecordChecks.R:37:2
  ── Error ('test-GetDrugMissings.R:41:3'): getDrugMissings overall ──────────────
  Error in `CDMConnector::cdm_from_con(db, cdm_tables = c("concept_ancestor", 
      "concept_relationship", "concept", "drug_strength", "drug_exposure"))`: unused argument (cdm_tables = c("concept_ancestor", "concept_relationship", "concept", "drug_strength", "drug_exposure"))
  Backtrace:
      ▆
   1. └─DrugExposureDiagnostics (local) getTestData() at test-GetDrugMissings.R:41:2
   2.   └─DrugExposureDiagnostics:::mockDrugExposure(drug_exposure = drug_exposure) at test-GetDrugMissings.R:37:2
  ── Error ('test-GetDrugMissings.R:55:3'): getDrugMissings byConcept ────────────
  Error in `CDMConnector::cdm_from_con(db, cdm_tables = c("concept_ancestor", 
      "concept_relationship", "concept", "drug_strength", "drug_exposure"))`: unused argument (cdm_tables = c("concept_ancestor", "concept_relationship", "concept", "drug_strength", "drug_exposure"))
  Backtrace:
      ▆
   1. └─DrugExposureDiagnostics (local) getTestData() at test-GetDrugMissings.R:55:2
   2.   └─DrugExposureDiagnostics:::mockDrugExposure(drug_exposure = drug_exposure) at test-GetDrugMissings.R:37:2
  ── Error ('test-IngredientOverview.R:34:3'): getIngredientOverview ─────────────
  Error in `CDMConnector::cdm_from_con(db, cdm_tables = c("concept_ancestor", 
      "concept_relationship", "concept", "drug_strength", "drug_exposure"))`: unused argument (cdm_tables = c("concept_ancestor", "concept_relationship", "concept", "drug_strength", "drug_exposure"))
  Backtrace:
      ▆
   1. └─DrugExposureDiagnostics (local) getInputDb() at test-IngredientOverview.R:34:2
   2.   └─DrugExposureDiagnostics:::mockDrugExposure(...) at test-IngredientOverview.R:28:2
  ── Error ('test-IngredientOverview.R:53:3'): getIngredientOverview error cases ──
  Error in `CDMConnector::cdm_from_con(db, cdm_tables = c("concept_ancestor", 
      "concept_relationship", "concept", "drug_strength", "drug_exposure"))`: unused argument (cdm_tables = c("concept_ancestor", "concept_relationship", "concept", "drug_strength", "drug_exposure"))
  Backtrace:
      ▆
   1. └─DrugExposureDiagnostics (local) getInputDb() at test-IngredientOverview.R:53:2
   2.   └─DrugExposureDiagnostics:::mockDrugExposure(...) at test-IngredientOverview.R:28:2
  ── Error ('test-IngredientOverview.R:63:3'): getIngredientsPresence ────────────
  Error in `CDMConnector::cdm_from_con(db, cdm_tables = c("concept_ancestor", 
      "concept_relationship", "concept", "drug_strength", "drug_exposure"))`: unused argument (cdm_tables = c("concept_ancestor", "concept_relationship", "concept", "drug_strength", "drug_exposure"))
  Backtrace:
      ▆
   1. └─DrugExposureDiagnostics (local) getInputDb() at test-IngredientOverview.R:63:2
   2.   └─DrugExposureDiagnostics:::mockDrugExposure(...) at test-IngredientOverview.R:28:2
  ── Error ('test-IngredientOverview.R:79:3'): getIngredientsPresence error cases ──
  Error in `CDMConnector::cdm_from_con(db, cdm_tables = c("concept_ancestor", 
      "concept_relationship", "concept", "drug_strength", "drug_exposure"))`: unused argument (cdm_tables = c("concept_ancestor", "concept_relationship", "concept", "drug_strength", "drug_exposure"))
  Backtrace:
      ▆
   1. └─DrugExposureDiagnostics (local) getInputDb() at test-IngredientOverview.R:79:2
   2.   └─DrugExposureDiagnostics:::mockDrugExposure(...) at test-IngredientOverview.R:28:2
  ── Error ('test-MockDrugExposureData.R:2:3'): check working example with defaults ──
  Error in `CDMConnector::cdm_from_con(db, cdm_tables = c("concept_ancestor", 
      "concept_relationship", "concept", "drug_strength", "drug_exposure"))`: unused argument (cdm_tables = c("concept_ancestor", "concept_relationship", "concept", "drug_strength", "drug_exposure"))
  Backtrace:
      ▆
   1. └─DrugExposureDiagnostics:::mockDrugExposure() at test-MockDrugExposureData.R:2:2
  ── Error ('test-MockDrugExposureData.R:112:3'): check working example with drug_strength ──
  Error in `CDMConnector::cdm_from_con(db, cdm_tables = c("concept_ancestor", 
      "concept_relationship", "concept", "drug_strength", "drug_exposure"))`: unused argument (cdm_tables = c("concept_ancestor", "concept_relationship", "concept", "drug_strength", "drug_exposure"))
  Backtrace:
      ▆
   1. └─DrugExposureDiagnostics:::mockDrugExposure(drug_strength = drug_strength) at test-MockDrugExposureData.R:112:2
  ── Error ('test-MockDrugExposureData.R:142:3'): check working example with drug drug_exposure ──
  Error in `CDMConnector::cdm_from_con(db, cdm_tables = c("concept_ancestor", 
      "concept_relationship", "concept", "drug_strength", "drug_exposure"))`: unused argument (cdm_tables = c("concept_ancestor", "concept_relationship", "concept", "drug_strength", "drug_exposure"))
  Backtrace:
      ▆
   1. └─DrugExposureDiagnostics:::mockDrugExposure(drug_exposure = drug_exposure) at test-MockDrugExposureData.R:142:2
  ── Error ('test-MockDrugExposureData.R:163:3'): check working example with drug_exposure options ──
  Error in `CDMConnector::cdm_from_con(db, cdm_tables = c("concept_ancestor", 
      "concept_relationship", "concept", "drug_strength", "drug_exposure"))`: unused argument (cdm_tables = c("concept_ancestor", "concept_relationship", "concept", "drug_strength", "drug_exposure"))
  Backtrace:
      ▆
   1. └─DrugExposureDiagnostics:::mockDrugExposure(...) at test-MockDrugExposureData.R:163:2
  ── Error ('test-MockDrugExposureData.R:174:3'): check working example with drug_strength options ──
  Error in `CDMConnector::cdm_from_con(db, cdm_tables = c("concept_ancestor", 
      "concept_relationship", "concept", "drug_strength", "drug_exposure"))`: unused argument (cdm_tables = c("concept_ancestor", "concept_relationship", "concept", "drug_strength", "drug_exposure"))
  Backtrace:
      ▆
   1. └─DrugExposureDiagnostics:::mockDrugExposure(...) at test-MockDrugExposureData.R:174:2
  ── Error ('test-SummariseQuantity.R:20:3'): check summary calculation ──────────
  Error in `CDMConnector::cdm_from_con(db, cdm_tables = c("concept_ancestor", 
      "concept_relationship", "concept", "drug_strength", "drug_exposure"))`: unused argument (cdm_tables = c("concept_ancestor", "concept_relationship", "concept", "drug_strength", "drug_exposure"))
  Backtrace:
      ▆
   1. └─DrugExposureDiagnostics:::mockDrugExposure(drug_exposure = drug_exposure) at test-SummariseQuantity.R:20:2
  ── Error ('test-checkDaysSupply.R:23:3'): check if it can detect missing ───────
  Error in `CDMConnector::cdm_from_con(db, cdm_tables = c("concept_ancestor", 
      "concept_relationship", "concept", "drug_strength", "drug_exposure"))`: unused argument (cdm_tables = c("concept_ancestor", "concept_relationship", "concept", "drug_strength", "drug_exposure"))
  Backtrace:
      ▆
   1. └─DrugExposureDiagnostics:::mockDrugExposure(drug_exposure = drug_exposure) at test-checkDaysSupply.R:23:2
  ── Error ('test-checkDaysSupply.R:68:3'): check if summarise days_supply works ──
  Error in `CDMConnector::cdm_from_con(db, cdm_tables = c("concept_ancestor", 
      "concept_relationship", "concept", "drug_strength", "drug_exposure"))`: unused argument (cdm_tables = c("concept_ancestor", "concept_relationship", "concept", "drug_strength", "drug_exposure"))
  Backtrace:
      ▆
   1. └─DrugExposureDiagnostics:::mockDrugExposure(drug_exposure = drug_exposure) at test-checkDaysSupply.R:68:2
  ── Error ('test-checkDrugDose.R:25:3'): checkDrugDose overall ──────────────────
  Error in `CDMConnector::cdm_from_con(db, cdm_tables = c("concept_ancestor", 
      "concept_relationship", "concept", "drug_strength", "drug_exposure"))`: unused argument (cdm_tables = c("concept_ancestor", "concept_relationship", "concept", "drug_strength", "drug_exposure"))
  Backtrace:
      ▆
   1. └─DrugExposureDiagnostics (local) getInputDb() at test-checkDrugDose.R:25:2
   2.   └─DrugExposureDiagnostics:::mockDrugExposure() at test-checkDrugDose.R:2:2
  ── Error ('test-checkDrugDose.R:54:3'): checkDrugDose by Concept ───────────────
  Error in `CDMConnector::cdm_from_con(db, cdm_tables = c("concept_ancestor", 
      "concept_relationship", "concept", "drug_strength", "drug_exposure"))`: unused argument (cdm_tables = c("concept_ancestor", "concept_relationship", "concept", "drug_strength", "drug_exposure"))
  Backtrace:
      ▆
   1. └─DrugExposureDiagnostics (local) getInputDb() at test-checkDrugDose.R:54:2
   2.   └─DrugExposureDiagnostics:::mockDrugExposure() at test-checkDrugDose.R:2:2
  ── Error ('test-getHistogram.R:21:3'): test histogram plotting ─────────────────
  Error in `CDMConnector::cdm_from_con(db, cdm_tables = c("concept_ancestor", 
      "concept_relationship", "concept", "drug_strength", "drug_exposure"))`: unused argument (cdm_tables = c("concept_ancestor", "concept_relationship", "concept", "drug_strength", "drug_exposure"))
  Backtrace:
      ▆
   1. └─DrugExposureDiagnostics (local) getInputDb() at test-getHistogram.R:21:2
   2.   └─DrugExposureDiagnostics:::mockDrugExposure(drug_exposure = drugExposure) at test-getHistogram.R:16:2
  ── Error ('test-getHistogram.R:31:3'): test save load fucntionality for histograms ──
  Error in `CDMConnector::cdm_from_con(db, cdm_tables = c("concept_ancestor", 
      "concept_relationship", "concept", "drug_strength", "drug_exposure"))`: unused argument (cdm_tables = c("concept_ancestor", "concept_relationship", "concept", "drug_strength", "drug_exposure"))
  Backtrace:
      ▆
   1. └─DrugExposureDiagnostics (local) getInputDb() at test-getHistogram.R:31:2
   2.   └─DrugExposureDiagnostics:::mockDrugExposure(drug_exposure = drugExposure) at test-getHistogram.R:16:2
  
  [ FAIL 23 | WARN 0 | SKIP 1 | PASS 102 ]
  Error: Test failures
  In addition: There were 32 warnings (use warnings() to see them)
  Execution halted
  There were 14 warnings (use warnings() to see them)