Running 'testthat.R' [105s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > #Copyright © 2016 RTE Réseau de transport d’électricité
  > 
  > library(testthat)
  > library(antaresEditObject)
  Loading required package: antaresRead
  > 
  > test_check("antaresEditObject")
  [ FAIL 14 | WARN 14 | SKIP 0 | PASS 150 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-RES.R:14'): RES works ──────────────────────────────────────────
  Error in `file(pathIni, "wb")`: cannot open the connection
  Backtrace:
      ▆
   1. └─antaresEditObject::createArea(name = "area51") at test-RES.R:14:2
   2.   └─antaresEditObject::writeIni(...)
   3.     └─antaresEditObject::writeIniFile(...)
   4.       └─base::file(pathIni, "wb")
  ── Error ('test-createArea.R:33'): Initialize a new area ───────────────────────
  Error in `file(pathIni, "wb")`: cannot open the connection
  Backtrace:
      ▆
   1. └─antaresEditObject::createArea(name = "myarea") at test-createArea.R:33:4
   2.   └─antaresEditObject::writeIni(...)
   3.     └─antaresEditObject::writeIniFile(...)
   4.       └─base::file(pathIni, "wb")
  ── Error ('test-createArea.R:41'): nodal optimization options are properly written ──
  Error in `file(pathIni, "wb")`: cannot open the connection
  Backtrace:
      ▆
   1. └─antaresEditObject::createArea(...) at test-createArea.R:41:4
   2.   └─antaresEditObject::writeIni(...)
   3.     └─antaresEditObject::writeIniFile(...)
   4.       └─base::file(pathIni, "wb")
  ── Error ('test-createArea.R:73'): Remove an area ──────────────────────────────
  Error in `file(pathIni, "wb")`: cannot open the connection
  Backtrace:
      ▆
   1. └─antaresEditObject::createArea(name = area2remove) at test-createArea.R:73:4
   2.   └─antaresEditObject::writeIni(...)
   3.     └─antaresEditObject::writeIniFile(...)
   4.       └─base::file(pathIni, "wb")
  ── Error ('test-createArea.R:100'): adequacy patch options are properly written ──
  Error in `file(pathIni, "wb")`: cannot open the connection
  Backtrace:
      ▆
   1. └─antaresEditObject::createArea(name = "testarea_adq", adequacy = adequacyOptions(adequacy_patch_mode = "inside")) at test-createArea.R:100:2
   2.   └─antaresEditObject::writeIni(...)
   3.     └─antaresEditObject::writeIniFile(...)
   4.       └─base::file(pathIni, "wb")
  ── Error ('test-createDSR.R:16'): Create a new DSR  ────────────────────────────
  Error in `file(pathIni, "wb")`: cannot open the connection
  Backtrace:
      ▆
   1. └─antaresEditObject::createDSR(dsrData) at test-createDSR.R:16:4
   2.   └─antaresEditObject:::.addDSRArea(...)
   3.     └─base::apply(...)
   4.       └─antaresEditObject (local) FUN(newX[, i], ...)
   5.         └─antaresEditObject::createArea(...)
   6.           └─antaresEditObject::writeIni(...)
   7.             └─antaresEditObject::writeIniFile(...)
   8.               └─base::file(pathIni, "wb")
  ── Failure ('test-createDSR.R:57'): overwrite a DSR  ───────────────────────────
  `suppressWarnings(createDSR(dsrData))` threw an error with unexpected message.
  Expected match: "The link a - a_dsr_3h already exist, use overwrite."
  Actual message: "cannot open the connection"
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-createDSR.R:57:4
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. ├─base::suppressWarnings(createDSR(dsrData))
    7. │ └─base::withCallingHandlers(...)
    8. └─antaresEditObject::createDSR(dsrData)
    9.   └─antaresEditObject:::.addDSRArea(...)
   10.     └─base::apply(...)
   11.       └─antaresEditObject (local) FUN(newX[, i], ...)
   12.         └─antaresRead::readLayout(opts = opts)
   13.           └─antaresRead:::.readLayout(opts = opts)
   14.             └─plyr::ldply(...)
   15.               └─plyr::llply(...)
   16.                 ├─base::structure(lapply(pieces, .fun, ...), dim = dim(pieces))
   17.                 └─base::lapply(pieces, .fun, ...)
   18.                   └─antaresRead (local) FUN(X[[i]], ...)
   19.                     ├─base::as.data.frame(readIniFile(file.path(path, f, "ui.ini"))$ui)
   20.                     └─antaresRead::readIniFile(file.path(path, f, "ui.ini"))
   21.                       └─base::readLines(file)
   22.                         └─base::file(con, "r")
  ── Error ('test-createDSR.R:59'): overwrite a DSR  ─────────────────────────────
  Error in `file(con, "r")`: cannot open the connection
  Backtrace:
       ▆
    1. └─antaresEditObject::createDSR(dsrData, overwrite = TRUE) at test-createDSR.R:59:4
    2.   └─antaresEditObject:::.addDSRArea(...)
    3.     └─base::apply(...)
    4.       └─antaresEditObject (local) FUN(newX[, i], ...)
    5.         └─antaresRead::readLayout(opts = opts)
    6.           └─antaresRead:::.readLayout(opts = opts)
    7.             └─plyr::ldply(...)
    8.               └─plyr::llply(...)
    9.                 ├─base::structure(lapply(pieces, .fun, ...), dim = dim(pieces))
   10.                 └─base::lapply(pieces, .fun, ...)
   11.                   └─antaresRead (local) FUN(X[[i]], ...)
   12.                     ├─base::as.data.frame(readIniFile(file.path(path, f, "ui.ini"))$ui)
   13.                     └─antaresRead::readIniFile(file.path(path, f, "ui.ini"))
   14.                       └─base::readLines(file)
   15.                         └─base::file(con, "r")
  ── Error ('test-createDSR.R:107'): getCapacityDSR and editDSR ──────────────────
  Error in `file(con, "r")`: cannot open the connection
  Backtrace:
       ▆
    1. └─antaresEditObject::createDSR(dsrData, overwrite = TRUE) at test-createDSR.R:107:4
    2.   └─antaresEditObject:::.addDSRArea(...)
    3.     └─base::apply(...)
    4.       └─antaresEditObject (local) FUN(newX[, i], ...)
    5.         └─antaresRead::readLayout(opts = opts)
    6.           └─antaresRead:::.readLayout(opts = opts)
    7.             └─plyr::ldply(...)
    8.               └─plyr::llply(...)
    9.                 ├─base::structure(lapply(pieces, .fun, ...), dim = dim(pieces))
   10.                 └─base::lapply(pieces, .fun, ...)
   11.                   └─antaresRead (local) FUN(X[[i]], ...)
   12.                     ├─base::as.data.frame(readIniFile(file.path(path, f, "ui.ini"))$ui)
   13.                     └─antaresRead::readIniFile(file.path(path, f, "ui.ini"))
   14.                       └─base::readLines(file)
   15.                         └─base::file(con, "r")
  ── Error ('test-createPSP.R:16'): Create a new weekly PSP  ─────────────────────
  Error in `file(pathIni, "wb")`: cannot open the connection
  Backtrace:
      ▆
   1. └─antaresEditObject::createPSP(...) at test-createPSP.R:16:4
   2.   └─antaresEditObject:::.addOneOfTheVirtualArea(...)
   3.     └─antaresEditObject::createArea(...)
   4.       └─antaresEditObject::writeIni(...)
   5.         └─antaresEditObject::writeIniFile(...)
   6.           └─base::file(pathIni, "wb")
  ── Error ('test-createPSP.R:46'): Overwrite a PSP  ─────────────────────────────
  Error in `file(con, "r")`: cannot open the connection
  Backtrace:
       ▆
    1. └─antaresEditObject::createPSP(...) at test-createPSP.R:46:4
    2.   └─antaresEditObject:::.addOneOfTheVirtualArea(...)
    3.     └─antaresRead::readLayout()
    4.       └─antaresRead:::.readLayout(opts = opts)
    5.         └─plyr::ldply(...)
    6.           └─plyr::llply(...)
    7.             ├─base::structure(lapply(pieces, .fun, ...), dim = dim(pieces))
    8.             └─base::lapply(pieces, .fun, ...)
    9.               └─antaresRead (local) FUN(X[[i]], ...)
   10.                 ├─base::as.data.frame(readIniFile(file.path(path, f, "ui.ini"))$ui)
   11.                 └─antaresRead::readIniFile(file.path(path, f, "ui.ini"))
   12.                   └─base::readLines(file)
   13.                     └─base::file(con, "r")
  ── Error ('test-createPSP.R:67'):  create a daily PSP  ─────────────────────────
  Error in `file(con, "r")`: cannot open the connection
  Backtrace:
       ▆
    1. └─antaresEditObject::createPSP(...) at test-createPSP.R:67:4
    2.   └─antaresEditObject:::.addOneOfTheVirtualArea(...)
    3.     └─antaresRead::readLayout()
    4.       └─antaresRead:::.readLayout(opts = opts)
    5.         └─plyr::ldply(...)
    6.           └─plyr::llply(...)
    7.             ├─base::structure(lapply(pieces, .fun, ...), dim = dim(pieces))
    8.             └─base::lapply(pieces, .fun, ...)
    9.               └─antaresRead (local) FUN(X[[i]], ...)
   10.                 ├─base::as.data.frame(readIniFile(file.path(path, f, "ui.ini"))$ui)
   11.                 └─antaresRead::readIniFile(file.path(path, f, "ui.ini"))
   12.                   └─base::readLines(file)
   13.                     └─base::file(con, "r")
  ── Error ('test-createPSP.R:134'): create a psp with a long name  ──────────────
  Error in `file(pathIni, "wb")`: cannot open the connection
  Backtrace:
      ▆
   1. └─antaresEditObject::createArea(areaName, overwrite = TRUE) at test-createPSP.R:134:4
   2.   └─antaresEditObject::writeIni(...)
   3.     └─antaresEditObject::writeIniFile(...)
   4.       └─base::file(pathIni, "wb")
  ── Error ('test-createPSP.R:160'): Get and set the PSP  ────────────────────────
  Error in `file(pathIni, "wb")`: cannot open the connection
  Backtrace:
      ▆
   1. └─antaresEditObject::createArea(areaName, overwrite = TRUE) at test-createPSP.R:160:4
   2.   └─antaresEditObject::writeIni(...)
   3.     └─antaresEditObject::writeIniFile(...)
   4.       └─base::file(pathIni, "wb")
  
  [ FAIL 14 | WARN 14 | SKIP 0 | PASS 150 ]
  Error: Test failures
  Execution halted