Running ‘testthat.R’ [69s/78s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(heemod)
  > 
  > ## the Sys.setenv fixes a problem running tests
  > ##   with parallel processing; related to
  > ##   https://github.com/hadley/testthat/issues/86 and
  > ##   https://github.com/hadley/testthat/issues/144
  > 
  > Sys.setenv("R_TESTS" = "")
  > 
  > test_check("heemod")
  ── 1. Error: absolute path works (@test_tabular_input.R#501)  ──────────────────
  cannot open the connection
  1: write.csv(ref_edit, file.path(system.file("tabular/test", package = "heemod"), "edited_ref.csv"), 
         row.names = FALSE) at testthat/test_tabular_input.R:501
  2: eval.parent(Call)
  3: eval(expr, p)
  4: eval(expr, p)
  5: write.table(ref_edit, file.path(system.file("tabular/test", package = "heemod"), 
         "edited_ref.csv"), row.names = FALSE, col.names = TRUE, sep = ",", dec = ".", 
         qmethod = "double")
  6: file(file, ifelse(append, "a", "w"))
  
  ── 2. Error: Running model from files works. (@test_tabular_input.R#775)  ──────
  cannot open the connection
  1: run_model_tabular(location = system.file("tabular/thr", package = "heemod"), run_psa = TRUE, 
         run_demo = TRUE, save = TRUE, overwrite = TRUE) at testthat/test_tabular_input.R:775
  2: save_outputs(outputs, output_dir, overwrite)
  3: utils::write.csv(summary(outputs$demographics)$scaled_results, file = file.path(output_dir, 
         "icer_by_group.csv"), row.names = FALSE)
  4: eval.parent(Call)
  5: eval(expr, p)
  6: eval(expr, p)
  7: write.table(summary(outputs$demographics)$scaled_results, file = file.path(output_dir, 
         "icer_by_group.csv"), row.names = FALSE, col.names = TRUE, sep = ",", dec = ".", 
         qmethod = "double")
  8: file(file, ifelse(append, "a", "w"))
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 473 SKIPPED: 0 FAILED: 2
  1. Error: absolute path works (@test_tabular_input.R#501) 
  2. Error: Running model from files works. (@test_tabular_input.R#775) 
  
  Error: testthat unit tests failed
  Execution halted