Running ‘testthat.R’ [10s/147s]
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/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(Epoch)
  > 
  > test_check("Epoch")
  Downloading FragilityData_subpt2_3.rds
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |======================================================================| 100%
  Request failed (Status code: 502). Retrying in 2s...
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |======================================================================| 100%
  Request failed (Status code: 502). Retrying in 4s...
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |======================================================================| 100%
  Saving _problems/test-EpochDownloader-126.R
  Saving _problems/test-EpochDownloader-138.R
  Downloading FragilityData_subpt2_3.rds
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |======================================================================| 100%
  Saving _problems/test-EpochDownloader-149.R
  Downloading FragilityData_subpt2_3.rds
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |======================================================================| 100%
  Saving _problems/test-EpochDownloader-232.R
  [ FAIL 5 | WARN 0 | SKIP 0 | PASS 180 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-EpochDownloader.R:126:3'): [ indexing returns correct number of Epoch objects ──
  <http_403/http_400/http_error/error/condition>
  Error: Forbidden (HTTP 403)
  Backtrace:
       ▆
    1. ├─downloader[subset_names] at test-EpochDownloader.R:126:3
    2. └─downloader[subset_names]
    3.   └─Epoch (local) .local(x, i, ...)
    4.     └─Epoch:::download_to_tmp_folder(x, non_exist_file_names)
    5.       ├─osfr::osf_download(...)
    6.       └─osfr:::osf_download.osf_tbl_file(...)
    7.         └─base::Map(...)
    8.           └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
    9.             └─osfr (local) `<fn>`(...)
   10.               └─osfr:::.wb_download(...)
   11.                 └─res$raise_for_status()
   12.                   ├─fauxpas::http(self, behavior = "stop")
   13.                   └─fauxpas:::http.HttpResponse(self, behavior = "stop")
   14.                     └─tmp$do(response)
  ── Error ('test-EpochDownloader.R:138:3'): [[ returns a single Epoch object ────
  Error in `value[[3L]](cond)`: Error loading file: /tmp/RtmpMF5BBU/working_dir/Rtmpx2NS2E/7rnft/FragilityData_subpt2_3.rds 
   unknown input format
  Backtrace:
       ▆
    1. ├─downloader[[1]] at test-EpochDownloader.R:138:3
    2. └─downloader[[1]]
    3.   └─Epoch (local) .local(x, i, ...)
    4.     ├─x[i]
    5.     └─x[i]
    6.       └─Epoch (local) .local(x, i, ...)
    7.         └─base::lapply(file_paths, load_single_file)
    8.           └─Epoch (local) FUN(X[[i]], ...)
    9.             └─base::tryCatch(...)
   10.               └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   11.                 └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   12.                   └─value[[3L]](cond)
  ── Error ('test-EpochDownloader.R:149:3'): $ returns a single Epoch object by name ──
  <http_403/http_400/http_error/error/condition>
  Error: Forbidden (HTTP 403)
  Backtrace:
       ▆
    1. ├─base::do.call("$", list(downloader, name1)) at test-EpochDownloader.R:149:3
    2. ├─`<EpchDwnl>`$FragilityData_subpt2_3
    3. └─`<EpchDwnl>`$FragilityData_subpt2_3
    4.   ├─x[name]
    5.   └─x[name]
    6.     └─Epoch (local) .local(x, i, ...)
    7.       └─Epoch:::download_to_tmp_folder(x, non_exist_file_names)
    8.         ├─osfr::osf_download(...)
    9.         └─osfr:::osf_download.osf_tbl_file(...)
   10.           └─base::Map(...)
   11.             └─base::mapply(FUN = f, ..., SIMPLIFY = FALSE)
   12.               └─osfr (local) `<fn>`(...)
   13.                 └─osfr:::.wb_download(...)
   14.                   └─res$raise_for_status()
   15.                     ├─fauxpas::http(self, behavior = "stop")
   16.                     └─fauxpas:::http.HttpResponse(self, behavior = "stop")
   17.                       └─tmp$do(response)
  ── Failure ('test-EpochDownloader.R:232:3'): [ indexing rejects non-whole number ──
  Expected `downloader[1]` not to throw any errors.
  Actually got a <http_403> with message:
    Forbidden (HTTP 403)
  ── Error ('test-EpochDownloader.R:238:3'): [[ enforces length 1 ────────────────
  Error in `value[[3L]](cond)`: Error loading file: /tmp/RtmpMF5BBU/working_dir/Rtmpx2NS2E/7rnft/FragilityData_subpt2_3.rds 
   unknown input format
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(downloader[["FragilityData_subpt2_3"]]) at test-EpochDownloader.R:238:3
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. ├─downloader[["FragilityData_subpt2_3"]]
   10. └─downloader[["FragilityData_subpt2_3"]]
   11.   └─Epoch (local) .local(x, i, ...)
   12.     ├─x[i]
   13.     └─x[i]
   14.       └─Epoch (local) .local(x, i, ...)
   15.         └─base::lapply(file_paths, load_single_file)
   16.           └─Epoch (local) FUN(X[[i]], ...)
   17.             └─base::tryCatch(...)
   18.               └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   19.                 └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   20.                   └─value[[3L]](cond)
  
  [ FAIL 5 | WARN 0 | SKIP 0 | PASS 180 ]
  Error:
  ! Test failures.
  Execution halted