Running ‘testthat.R’ [7s/8s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(magclass)
  > 
  > test_check("magclass")
  [ FAIL 5 | WARN 0 | SKIP 3 | PASS 643 ]
  
  ══ Skipped tests (3) ═══════════════════════════════════════════════════════════
  • {quitte} is not installed (2): 'test-as.magpie.R:22:3',
    'test-as.magpie.R:63:3'
  • {terra} is not installed (1): 'test-raster.R:1:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-readwritemagpie.R:86:3'): handling of spatial data works ─────
  `write.magpie(m10, file.path(td, "test.grd"))` threw an error with unexpected message.
  Expected match: "no support for multiple variables"
  Actual message: "The package \"raster\" is required!"
  Backtrace:
      ▆
   1. ├─testthat::expect_error(...) at test-readwritemagpie.R:86:3
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─magclass::write.magpie(m10, file.path(td, "test.grd"))
  ── Error ('test-readwritemagpie.R:87:3'): handling of spatial data works ───────
  Error in `write.magpie(m10, file.path(td, "test.nc"))`: The packages "ncdf4" and "terra" are required!
  Backtrace:
      ▆
   1. ├─testthat::expect_no_warning(write.magpie(m10, file.path(td, "test.nc"))) at test-readwritemagpie.R:87:3
   2. │ └─testthat:::expect_no_(...)
   3. │   └─testthat:::quasi_capture(enquo(object), NULL, capture)
   4. │     ├─testthat (local) .capture(...)
   5. │     │ └─rlang::try_fetch(...)
   6. │     │   └─base::withCallingHandlers(...)
   7. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   8. └─magclass::write.magpie(m10, file.path(td, "test.nc"))
  ── Failure ('test-readwritemagpie.R:157:3'): read/write triggers errors and warnings correctly ──
  `write.magpie(as.magpie(1), "bla.nc")` threw an error with unexpected message.
  Expected match: "No coordinates"
  Actual message: "The packages \"ncdf4\" and \"terra\" are required!"
  Backtrace:
      ▆
   1. ├─testthat::expect_error(...) at test-readwritemagpie.R:157:3
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─magclass::write.magpie(as.magpie(1), "bla.nc")
  ── Failure ('test-readwritemagpie.R:158:3'): read/write triggers errors and warnings correctly ──
  `write.magpie(a, "blub.grd")` threw an error with unexpected message.
  Expected match: "no support for multiple variables"
  Actual message: "The package \"raster\" is required!"
  Backtrace:
      ▆
   1. ├─testthat::expect_error(write.magpie(a, "blub.grd"), "no support for multiple variables") at test-readwritemagpie.R:158:3
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─magclass::write.magpie(a, "blub.grd")
  ── Failure ('test-readwritemagpie.R:159:3'): read/write triggers errors and warnings correctly ──
  `write.magpie(a[, , 1], "blub.asc")` threw an error with unexpected message.
  Expected match: "choose just one"
  Actual message: "The package \"raster\" is required!"
  Backtrace:
      ▆
   1. ├─testthat::expect_error(write.magpie(a[, , 1], "blub.asc"), "choose just one") at test-readwritemagpie.R:159:3
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─magclass::write.magpie(a[, , 1], "blub.asc")
  
  [ FAIL 5 | WARN 0 | SKIP 3 | PASS 643 ]
  Error: Test failures
  Execution halted