Running ‘testthat.R’ [30s/24s]
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(CodelistGenerator)
  > 
  > test_check("CodelistGenerator")
  Starting 2 test processes.
  > test-asCodelist.R: Limiting to domains of interest
  > test-asCodelist.R: Getting concepts to include
  > test-asCodelist.R: Adding descendants
  > test-asCodelist.R: Search completed. Finishing up.
  > test-asCodelist.R: v 4 candidate concepts identified
  > test-asCodelist.R: Time taken: 0 minutes and 2 seconds
  Saving _problems/test-compareCodelists-108.R
  Saving _problems/test-buildAchillesTables-55.R
  Saving _problems/test-getCandidateCodes-7.R
  Saving _problems/test-mockVocabRef-2.R
  > test-searchStrategy.R: Limiting to domains of interest
  > test-searchStrategy.R: Getting concepts to include
  > test-searchStrategy.R: Adding descendants
  > test-searchStrategy.R: Search completed. Finishing up.
  > test-searchStrategy.R: v 5 candidate concepts identified
  > test-searchStrategy.R: Time taken: 0 minutes and 0 seconds
  Saving _problems/test-stratifyByRouteCategory-5.R
  > test-stratifyByDoseUnit.R: Limiting to domains of interest
  > test-stratifyByDoseUnit.R: Getting concepts to include
  > test-stratifyByDoseUnit.R: Adding descendants
  > test-stratifyByDoseUnit.R: Search completed. Finishing up.
  > test-stratifyByDoseUnit.R: v 2 candidate concepts identified
  > test-stratifyByDoseUnit.R: Time taken: 0 minutes and 0 seconds
  Saving _problems/test-subsetOnDomain-6.R
  Saving _problems/test-subsetOnRouteCategory-6.R
  Saving _problems/test-summariseAchillesCodeUse-64.R
  > test-tidyWords.R: Symbols "-" will be ignored.
  > test-tidyWords.R: `-` will be replaced by an empty space.
  > test-tidyWords.R: Symbols "[", "¹", "⁸", "]", and "-" will be ignored.
  > test-tidyWords.R: `-` will be replaced by an empty space.
  [ FAIL 8 | WARN 0 | SKIP 51 | PASS 179 ]
  
  ══ Skipped tests (51) ══════════════════════════════════════════════════════════
  • On CRAN (48): 'test-asCodelistWithDetails.R:2:3', 'test-availableATC.R:2:3',
    'test-availableConceptClassIds.R:2:3', 'test-availableDomains.R:2:3',
    'test-availableDoseForms.R:2:3', 'test-availableDoseUnit.R:2:3',
    'test-availableDrugIngredients.R:2:3', 'test-availableRelationshipIds.R:2:3',
    'test-availableRouteCategories.R:2:3', 'test-availableVocabularies.R:2:3',
    'test-codesFrom.R:2:3', 'test-codesFrom.R:118:3',
    'test-compareCodelists.R:2:3', 'test-dbms.R:4:3', 'test-dbms.R:170:3',
    'test-dbms.R:308:3', 'test-dbms.R:460:3', 'test-buildAchillesTables.R:2:3',
    'test-drugCodes.R:2:3', 'test-drugCodes.R:38:3', 'test-drugCodes.R:55:3',
    'test-drugCodes.R:185:3', 'test-drugCodes.R:508:3',
    'test-getCandidateCodes.R:409:3', 'test-getCandidateCodes.R:447:3',
    'test-getMappings.R:2:3', 'test-intersectCodelists.R:2:3',
    'test-intersectCodelists.R:48:3', 'test-stratifyByBrand.R:2:3',
    'test-stratifyByConcept.R:2:3', 'test-subsetOnDoseUnit.R:2:3',
    'test-subsetOnIngredientRange.R:2:3', 'test-subsetOnVocabulary.R:2:3',
    'test-subsetToCodesInUse.R:2:3', 'test-summariseAchillesCodeUse.R:2:3',
    'test-summariseCodeUse.R:2:3', 'test-summariseCodeUse.R:362:3',
    'test-summariseCodeUse.R:863:3', 'test-summariseCodeUse.R:890:3',
    'test-summariseCodeUse.R:923:3', 'test-summariseOrphanCodes.R:2:3',
    'test-tableAchillesCodeUse.R:2:3', 'test-tableCodeUse.R:2:3',
    'test-tableCodeUse.R:88:3', 'test-tableOrphanCodes.R:3:3',
    'test-unionCodelists.R:2:3', 'test-unionCodelists.R:44:3',
    'test-vocabUtilities.R:2:3'
  • Skipping (1): 'test-summariseCodeUse.R:606:3'
  • Sys.getenv("CDM5_SQL_SERVER_SERVER") == "" is TRUE (1):
    'test-subsetToCodesInUse.R:57:3'
  • Sys.getenv("darwinDbDatabaseServer") == "" is TRUE (1):
    'test-synthea_sql_server.R:2:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-compareCodelists.R:108:5'): comparing two codelists- same codes found different ways ──
  <rlib_error_package_not_found/rlang_error/error/condition>
  Error in `mockVocabRef(backends[[i]])`: The package "duckdb" is required.
  Backtrace:
      ▆
   1. └─CodelistGenerator::mockVocabRef(backends[[i]]) at test-compareCodelists.R:108:5
   2.   └─rlang::check_installed("duckdb")
  ── Error ('test-buildAchillesTables.R:55:3'): test buildAchillesTables when not all tables required are present ──
  Error in `(function (cond)  .Internal(C_tryCatchHelper(addr, 1L, cond)))(structure(list(message = "there is no package called 'duckdb'", call = loadNamespace(x), package = "duckdb", lib.loc = NULL), class = c("packageNotFoundError", "error", "condition")))`: error in evaluating the argument 'drv' in selecting a method for function 'dbConnect': there is no package called 'duckdb'
  Backtrace:
      ▆
   1. ├─DBI::dbConnect(duckdb::duckdb()) at test-buildAchillesTables.R:55:3
   2. ├─base::loadNamespace(x)
   3. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   5. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   6. │ └─base::stop(cond)
   7. └─base (local) `<fn>`(`<pckgNtFE>`)
  ── Error ('test-getCandidateCodes.R:7:5'): tests with mock db ──────────────────
  <rlib_error_package_not_found/rlang_error/error/condition>
  Error in `mockVocabRef(backends[[i]])`: The package "duckdb" is required.
  Backtrace:
      ▆
   1. └─CodelistGenerator::mockVocabRef(backends[[i]]) at test-getCandidateCodes.R:7:5
   2.   └─rlang::check_installed("duckdb")
  ── Error ('test-mockVocabRef.R:2:3'): mock vocab db ────────────────────────────
  <rlib_error_package_not_found/rlang_error/error/condition>
  Error in `mockVocabRef("database")`: The package "duckdb" is required.
  Backtrace:
      ▆
   1. └─CodelistGenerator::mockVocabRef("database") at test-mockVocabRef.R:2:3
   2.   └─rlang::check_installed("duckdb")
  ── Error ('test-stratifyByRouteCategory.R:5:5'): stratify by route works ───────
  <rlib_error_package_not_found/rlang_error/error/condition>
  Error in `mockVocabRef(backends[[i]])`: The package "duckdb" is required.
  Backtrace:
      ▆
   1. └─CodelistGenerator::mockVocabRef(backends[[i]]) at test-stratifyByRouteCategory.R:5:5
   2.   └─rlang::check_installed("duckdb")
  ── Error ('test-subsetOnDomain.R:6:5'): subset on domain ───────────────────────
  <rlib_error_package_not_found/rlang_error/error/condition>
  Error in `mockVocabRef(backends[[i]])`: The package "duckdb" is required.
  Backtrace:
      ▆
   1. └─CodelistGenerator::mockVocabRef(backends[[i]]) at test-subsetOnDomain.R:6:5
   2.   └─rlang::check_installed("duckdb")
  ── Error ('test-subsetOnRouteCategory.R:6:5'): subset on route category ────────
  <rlib_error_package_not_found/rlang_error/error/condition>
  Error in `mockVocabRef(backends[[i]])`: The package "duckdb" is required.
  Backtrace:
      ▆
   1. └─CodelistGenerator::mockVocabRef(backends[[i]]) at test-subsetOnRouteCategory.R:6:5
   2.   └─rlang::check_installed("duckdb")
  ── Error ('test-summariseAchillesCodeUse.R:64:3'): achilles code use: multipe codelists ──
  <rlib_error_package_not_found/rlang_error/error/condition>
  Error in `mockVocabRef("database")`: The package "duckdb" is required.
  Backtrace:
      ▆
   1. └─CodelistGenerator::mockVocabRef("database") at test-summariseAchillesCodeUse.R:64:3
   2.   └─rlang::check_installed("duckdb")
  
  [ FAIL 8 | WARN 0 | SKIP 51 | PASS 179 ]
  Error:
  ! Test failures.
  Execution halted