Running ‘testthat.R’ [3s/9s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # Point pak's pkgcache at a per-session writable cache BEFORE library(Require)
  > # loads pak. Under R CMD check (CRAN policy), pkgcache aborts if R_USER_CACHE_DIR
  > # is unset; without this every Require::Install() inside the test suite errors
  > # with "Please install pak" because pak's namespace fails to load.
  > if (!nzchar(Sys.getenv("R_USER_CACHE_DIR"))) {
  +   .ucd <- tempfile("RequireUserCache_")
  +   dir.create(.ucd, recursive = TRUE, showWarnings = FALSE)
  +   Sys.setenv(R_USER_CACHE_DIR = .ucd)
  +   rm(.ucd)
  + }
  > 
  > library(Require)
  > library(testthat)
  
  Attaching package: 'testthat'
  
  The following object is masked from 'package:Require':
  
      setup
  
  > test_check("Require")
  Saving _problems/test-00pkgSnapshot_testthat-2.R
  Saving _problems/test-02extract_testthat-3.R
  Saving _problems/test-03helpers_testthat-3.R
  Saving _problems/test-08modules_testthat-4.R
  Saving _problems/test-10DifferentPkgs_testthat-2.R
  Loading required namespace: pak
  Failed with error:  'there is no package called 'pak''
  Saving _problems/test-14coverage2_testthat-158.R
  Saving _problems/test-15bugfixes_testthat-630.R
  Saving _problems/test-15bugfixes_testthat-667.R
  Loading required namespace: pak
  Failed with error:  'there is no package called 'pak''
  Saving _problems/test-15bugfixes_testthat-674.R
  Saving _problems/test-17usePak-372.R
  Saving _problems/test-17usePak-384.R
  Saving _problems/test-17usePak-386.R
  Saving _problems/test-17usePak-388.R
  Saving _problems/test-17usePak-1014.R
  Saving _problems/test-17usePak-1486.R
  Saving _problems/test-19smallSnapshot_testthat-2.R
  [ FAIL 16 | WARN 0 | SKIP 31 | PASS 374 ]
  
  ══ Skipped tests (31) ══════════════════════════════════════════════════════════
  • On CRAN (15): 'test-01packages_testthat.R:12:3',
    'test-04other_testthat.R:8:3', 'test-05packagesLong_testthat.R:3:3',
    'test-06pkgDep_testthat.R:2:3', 'test-09pkgSnapshotLong_testthat.R:13:3',
    'test-11misc_testthat.R:7:3', 'test-12offlineMode_testthat.R:9:3',
    'test-12offlineMode_testthat.R:76:3',
    'test-16installFailureMetadata_testthat.R:449:3',
    'test-16installFailureMetadata_testthat.R:473:3',
    'test-16installFailureMetadata_testthat.R:509:3',
    'test-16installFailureMetadata_testthat.R:547:3',
    'test-16installFailureMetadata_testthat.R:586:3',
    'test-16installFailureMetadata_testthat.R:638:3',
    'test-18nosudo_testthat.R:108:3'
  • parentChain test uses non-pak pkgDep internals (1):
    'test-16parentChain_integration_testthat.R:25:3'
  • {pak} is not installed (15): 'test-15bugfixes_testthat.R:200:3',
    'test-15bugfixes_testthat.R:246:3', 'test-15bugfixes_testthat.R:301:3',
    'test-15bugfixes_testthat.R:364:3', 'test-15bugfixes_testthat.R:432:3',
    'test-15bugfixes_testthat.R:790:3', 'test-15bugfixes_testthat.R:848:3',
    'test-17usePak.R:155:3', 'test-17usePak.R:191:3', 'test-17usePak.R:255:3',
    'test-17usePak.R:1067:3', 'test-17usePak.R:1110:3', 'test-17usePak.R:1134:3',
    'test-17usePak.R:1158:3', 'test-17usePak.R:1218:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-00pkgSnapshot_testthat.R:2:3'): test 1 ─────────────────────────
  Error: Please install pak (loadNamespace('pak') failed: there is no package called 'pak')
  Backtrace:
      ▆
   1. └─Require:::setupTest() at test-00pkgSnapshot_testthat.R:2:3
   2.   └─Require::Install(c("curl", "httr", "waldo")) at ./helper_0.R:25:3
   3.     └─Require::Require(...)
   4.       ├─base::withCallingHandlers(...)
   5.       └─Require:::pakDepsToPkgDT(...)
  ── Error ('test-02extract_testthat.R:3:3'): test 1 ─────────────────────────────
  Error: Please install pak (loadNamespace('pak') failed: there is no package called 'pak')
  Backtrace:
      ▆
   1. └─Require:::setupTest() at test-02extract_testthat.R:3:3
   2.   └─Require::Install(c("curl", "httr", "waldo")) at ./helper_0.R:25:3
   3.     └─Require::Require(...)
   4.       ├─base::withCallingHandlers(...)
   5.       └─Require:::pakDepsToPkgDT(...)
  ── Error ('test-03helpers_testthat.R:3:3'): test 3 ─────────────────────────────
  Error: Please install pak (loadNamespace('pak') failed: there is no package called 'pak')
  Backtrace:
      ▆
   1. └─Require:::setupTest() at test-03helpers_testthat.R:3:3
   2.   └─Require::Install(c("curl", "httr", "waldo")) at ./helper_0.R:25:3
   3.     └─Require::Require(...)
   4.       ├─base::withCallingHandlers(...)
   5.       └─Require:::pakDepsToPkgDT(...)
  ── Error ('test-08modules_testthat.R:4:3'): test 8 ─────────────────────────────
  Error: Please install pak (loadNamespace('pak') failed: there is no package called 'pak')
  Backtrace:
      ▆
   1. └─Require:::setupTest() at test-08modules_testthat.R:4:3
   2.   └─Require::Install(c("curl", "httr", "waldo")) at ./helper_0.R:25:3
   3.     └─Require::Require(...)
   4.       ├─base::withCallingHandlers(...)
   5.       └─Require:::pakDepsToPkgDT(...)
  ── Error ('test-10DifferentPkgs_testthat.R:2:3'): test 10 ──────────────────────
  Error: Please install pak (loadNamespace('pak') failed: there is no package called 'pak')
  Backtrace:
      ▆
   1. └─Require:::setupTest(needRequireInNewLib = TRUE) at test-10DifferentPkgs_testthat.R:2:3
   2.   └─Require::Install(c("curl", "httr", "waldo")) at ./helper_0.R:25:3
   3.     └─Require::Require(...)
   4.       ├─base::withCallingHandlers(...)
   5.       └─Require:::pakDepsToPkgDT(...)
  ── Error ('test-14coverage2_testthat.R:158:3'): pkgDepTopoSort with local packages ──
  Error in `pkgDep(packages, recursive = TRUE, purge = purge, libPaths = libPaths, which = which, verbose = verbose, includeSelf = FALSE)`: Please install pak
  Backtrace:
      ▆
   1. └─Require::pkgDepTopoSort("data.table") at test-14coverage2_testthat.R:158:3
   2.   └─Require::pkgDep(...)
  ── Failure ('test-15bugfixes_testthat.R:630:3'): Require accepts a multi-line string of packages (issue #147) ──
  Expected `all(res)` to be TRUE.
  Differences:
  `actual`:   FALSE
  `expected`: TRUE 
  
  ── Failure ('test-15bugfixes_testthat.R:667:3'): Require accepts an unquoted `{...}` block ──
  Expected `all(res)` to be TRUE.
  Differences:
  `actual`:   FALSE
  `expected`: TRUE 
  
  ── Error ('test-15bugfixes_testthat.R:674:3'): pkgDepTopoSort's first arg is `packages` (consistent with Require) ──
  Error in `pkgDep(packages, recursive = TRUE, purge = purge, libPaths = libPaths, which = which, verbose = verbose, includeSelf = FALSE)`: Please install pak
  Backtrace:
      ▆
   1. └─Require::pkgDepTopoSort(packages = "data.table") at test-15bugfixes_testthat.R:674:3
   2.   └─Require::pkgDep(...)
  ── Failure ('test-17usePak.R:371:3'): recovery mechanism adds loadOrder for packages absent from pkgDT but installed ──
  Expected `any(recoverable)` to be TRUE.
  Differences:
  `actual`:   FALSE
  `expected`: TRUE 
  
  digest should be recoverable (installed version satisfies >= 0.1.0)
  ── Failure ('test-17usePak.R:383:3'): recovery mechanism adds loadOrder for packages absent from pkgDT but installed ──
  Expected `pkg %in% recoverPkgs` to be TRUE.
  Differences:
  `actual`:   FALSE
  `expected`: TRUE 
  
  digest must be in the set of recovered packages
  ── Failure ('test-17usePak.R:385:3'): recovery mechanism adds loadOrder for packages absent from pkgDT but installed ──
  Expected `is.na(recoverDT$loadOrder[recoverDT$Package == pkg])` to be FALSE.
  Differences:
  `actual`:        
  `expected`: FALSE
  
  recovered digest must have a non-NA loadOrder so doLoads() will require() it
  ── Failure ('test-17usePak.R:387:3'): recovery mechanism adds loadOrder for packages absent from pkgDT but installed ──
  Expected `isTRUE(recoverDT$installedVersionOK[recoverDT$Package == pkg])` to be TRUE.
  Differences:
  `actual`:   FALSE
  `expected`: TRUE 
  
  recovered digest must have installedVersionOK = TRUE
  ── Failure ('test-17usePak.R:1013:3'): pinInstalledForPak rewrites installed plain refs to pkg@version ──
  Expected `out[1L]` to be identical to `paste0("data.table@", dtVer)`.
  Differences:
  `actual`:   "data.table"       
  `expected`: "data.table@1.18.4"
  
  installed data.table must be pinned to its installed version
  ── Failure ('test-17usePak.R:1485:3'): pinInstalledForPak skips user-version-constrained packages ──
  Expected `grepl("^data.table@", out[2])` to be TRUE.
  Differences:
  `actual`:   FALSE
  `expected`: TRUE 
  
  bare user packages with no constraint must be pinned to installed version to keep deps stable
  ── Error ('test-19smallSnapshot_testthat.R:2:3'): small snapshot install pins each package to the requested version ──
  Error: Please install pak (loadNamespace('pak') failed: there is no package called 'pak')
  Backtrace:
      ▆
   1. └─Require:::setupTest() at test-19smallSnapshot_testthat.R:2:3
   2.   └─Require::Install(c("curl", "httr", "waldo")) at ./helper_0.R:25:3
   3.     └─Require::Require(...)
   4.       ├─base::withCallingHandlers(...)
   5.       └─Require:::pakDepsToPkgDT(...)
  
  [ FAIL 16 | WARN 0 | SKIP 31 | PASS 374 ]
  Error:
  ! Test failures.
  Execution halted